Microsoft.Ajax axd files does not cache/ return 304

10 posts, 0 answers
  1. K
    K avatar
    11 posts
    Member since:
    Aug 2013

    Posted 23 Dec 2015 Link to this post

    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.

  2. K
    K avatar
    11 posts
    Member since:
    Aug 2013

    Posted 23 Dec 2015 in reply to K Link to this post

    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

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 24 Dec 2015 Link to this post

    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
  5. K
    K avatar
    11 posts
    Member since:
    Aug 2013

    Posted 19 Jan in reply to Hristo Valyavicharski Link to this post

    Thanks for the reply.

    However what if CDN is not an option.

  6. K
    K avatar
    11 posts
    Member since:
    Aug 2013

    Posted 04 Mar in reply to K Link to this post

    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.
  7. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 07 Mar Link to this post

    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
  8. K
    K avatar
    11 posts
    Member since:
    Aug 2013

    Posted 07 Mar in reply to Hristo Valyavicharski Link to this post

    L
    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

     

    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?

     

  9. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 07 Mar Link to this post

    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
  10. K
    K avatar
    11 posts
    Member since:
    Aug 2013

    Posted 09 Mar in reply to Hristo Valyavicharski Link to this post

    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

     

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

     

     

     

     

     

  11. K
    K avatar
    11 posts
    Member since:
    Aug 2013

    Posted 09 Mar in reply to K Link to this post

    This is my telerik version 2013.3.1324.40
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017