This is a migrated thread and some comments may be shown as answers.

Microsoft.Ajax axd files does not cache/ return 304

9 Answers 154 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
K
Top achievements
Rank 1
K asked on 24 Dec 2015, 05:06 AM

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

Sort by
0
K
Top achievements
Rank 1
answered on 24 Dec 2015, 05:15 AM

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

0
Hristo Valyavicharski
Telerik team
answered on 24 Dec 2015, 11:11 AM
Hi,

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">
 
<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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
K
Top achievements
Rank 1
answered on 19 Jan 2016, 04:11 PM

Thanks for the reply.

However what if CDN is not an option.

0
K
Top achievements
Rank 1
answered on 04 Mar 2016, 06:51 AM
Any response, what is CDN is not possible and I want it to cache within internal network. It does not seem to be working correctly.
0
Hristo Valyavicharski
Telerik team
answered on 07 Mar 2016, 09:52 AM
You can setup a local CDN in your internal network: Custom CDN Provider

Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
K
Top achievements
Rank 1
answered on 07 Mar 2016, 10:03 AM
L[quote]Hristo Valyavicharski said:You can setup a local CDN in your internal network: Custom CDN Provider

Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

[/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?

 

0
Hristo Valyavicharski
Telerik team
answered on 07 Mar 2016, 12:04 PM
This is how the asp.net works. Try to set:
<compilation debug="true" targetFramework="4.0"/>

For more information please read this article: http://weblogs.asp.net/scottgu/442448

Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
K
Top achievements
Rank 1
answered on 09 Mar 2016, 06:33 AM
[quote]Hristo Valyavicharski said:This is how the asp.net works. Try to set:
<compilation debug="true" targetFramework="4.0"/>

For more information please read this article: http://weblogs.asp.net/scottgu/442448

Regards,
Hristo Valyavicharski
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

[/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" />

 

 

 

 

 

0
K
Top achievements
Rank 1
answered on 09 Mar 2016, 06:41 AM
This is my telerik version 2013.3.1324.40
Tags
General Discussions
Asked by
K
Top achievements
Rank 1
Answers by
K
Top achievements
Rank 1
Hristo Valyavicharski
Telerik team
Share this question
or