I have the following settings
1. web.config
<system.web.extensions >
<scripting ><webServices/>
<scriptResourceHandler
enableCompression="true"
enableCaching="true" />
</scripting >
</system.web.extensions >
2. compilation debug = false in web.config and master page
3. <telerik:RadScriptManager ID="ScriptManager" runat="server" ScriptMode="Release" EnableScriptCombine="false" CacheSettings-Enabled="true" /> in master page.
However if i enable cdn, cdn is able to server 304, I assume it is because the files are static in the CDN.
Can Telerik support advise howw to make axd return 304?
Thanks.
9 Answers, 1 is accepted
Following are the headers gathered from fiddler.
Request Headers
=======================
GET XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Accept: */*
Referer: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3)
Accept-Encoding: gzip, deflate
Host: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.cloudapp.net
If-Modified-Since: Thu, 24 Dec 2015 02:18:22 GMT
DNT: 1
Connection: Keep-Alive
Pragma: no-cache
Cookie: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=l01nixno3twxdf3l0zrvgyo1
Response Headers
=======================
HTTP/1.1 200 OK
Cache-Control: public
Content-Length: 40329
Content-Type: application/x-javascript
Expires: Fri, 23 Dec 2016 05:12:56 GMT
Last-Modified: Thu, 24 Dec 2015 05:12:56 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Thu, 24 Dec 2015 05:12:56 GMT
Use CDN's:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <telerik:RadStyleSheetManager runat="server" CdnSettings-TelerikCdn="Auto"></telerik:RadStyleSheetManager></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableCdn="true" > </telerik:RadScriptManager> <telerik:RadComboBox runat="server"></telerik:RadComboBox> <script type="text/javascript"> </script> </form></body></html>or define required scripts in the script manager:
<telerik:RadScriptManager runat="server" EnableCdn="true" EnableEmbeddedjQuery="false"> <Scripts> <%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=272931&clcid=0x409 --%> <%--Framework scripts--%> <asp:ScriptReference Name="MsAjaxBundle" /> <asp:ScriptReference Name="jquery" /> <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" /> <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" /> <asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" /> <asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" /> <asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" /> <asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" /> <asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" /> <asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" /> <asp:ScriptReference Name="WebFormsBundle" /> <%--Site scripts--%> </Scripts> </telerik:RadScriptManager>Similar questions are widely discussed here:
http://www.telerik.com/forums/scripts-errors-with-radscriptmanager-and-jquery
Regards,
Hristo Valyavicharski
Telerik
Thanks for the reply.
However what if CDN is not an option.
Regards,
Hristo Valyavicharski
Telerik
Regards,
Hristo Valyavicharski
Telerik
[/quote]
Please correct me if my understanding is wrong, it seems the AXD is not correctly returning a correct status code which seems to me is a bug....and the suggestion is to do all this legwork to setup a "mini/localised" CDN as workaround?
<compilation debug="true" targetFramework="4.0"/>For more information please read this article: http://weblogs.asp.net/scottgu/442448
Regards,
Hristo Valyavicharski
Telerik
<compilation debug="true" targetFramework="4.0"/>For more information please read this article: http://weblogs.asp.net/scottgu/442448
Regards,
Hristo Valyavicharski
Telerik
[/quote]
I have tried that and it seems it does not work. Please see attached images.
<compilation debug="false" targetFramework="4.0"><telerik:RadScriptManager ID="ScriptManager" runat="server" ScriptMode="Release" EnableScriptCombine="false" CacheSettings-Enabled="true" /><telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" EnableStyleSheetCombine="false" />
<add key="Telerik.ScriptManager.TelerikCdn" value="Enabled" /> <add key="Telerik.StyleSheetManager.TelerikCdn" value="Enabled" />