+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / No-Cache Header Problem

No-Cache Header Problem

5 posts, 0 answered
  1. sean2078
    sean2078 avatar
    7 posts
    Registered:
    14 Nov 2004
    23 Oct 2009
    Link to this post
    Hello,

    We're having an issue w/ our SiteFinity 3.6 site, where each published page viewed in the browser emits the following headers:

    Cache-Control: no-cache 
    Pragma: no-cache 
    Expires: -1 

    Here is the full header listing:

    Date: Fri, 23 Oct 2009 14:58:55 GMT<br>Server: Microsoft-IIS/6.0 
    X-Powered-By: ASP.NET 
    X-AspNet-Version: 2.0.50727 
    Cache-Control: no-cache 
    Pragma: no-cache 
    Expires: -1 
    Content-Type: text/html; charset=utf-8 
    Content-Length: 32923 

    The url can be found here for direct testing:
    http://tiny.cc/z3jit

    We have done everything we can to try to enable caching for this site.  The above URL points the production server.  On test and development computers, the above headers do not appear and browsers cache fine.  On development/test computers, the following header output is obtained for the exact same page:

    Server: Microsoft-IIS/5.1 
    Date: Fri, 23 Oct 2009 15:14:29 GMT 
    Transfer-Encoding: chunked 
    Content-Type: text/html 

    Note the "no-cache" headers are not present (Transfer-Encoding is chunked b/c IIS metabase settings have compression settings enabled)

    We've followed all instructions in the user guide regarding enabling of page caching.  This page's cache setting is set to enabled, with a 12000 timeout, no sliding-expiration.  The web.config file in use has the following cache settings:

            <framework> 
                <caching defaultProvider="memoryCache"
                    <providers> 
                        <add name="memoryCache" type="Telerik.Caching.MemoryCachingProvider, Telerik.Framework"/> 
                        <add name="ASPNET" type="Telerik.Caching.AspNetCachingProvider, Telerik.Framework" duration="12000" slidingExpiration="false"/> 
                    </providers> 
                    <cacheDependency mode="InMemory"/> 
                </caching> 

    Changing the defaultProvider to "ASPNET" doesn't change the header output (but does prevent a few memory cached image from displaying of course) - After checking this, setting was changed back to "memoryCache".

    We have checked the IIS settings for "Enable content expiration" and "Custom HTTP Headers", and the enable content expiration checkbox is unchecked, and there are no special custom HTTP headers present.

    We would like to not have to setup a new server just to test out if the problem will persist to the new server.  What can we do to get SiteFinity to not output these headers?  Urgent assistance is requested.

    Thank you in advance

    sean2078
  2. sean2078
    sean2078 avatar
    7 posts
    Registered:
    14 Nov 2004
    27 Oct 2009
    Link to this post
    No takers? ;)  I see 6 Telerik admin responses after this post - What if I said please? :)
  3. Nikolai
    Nikolai avatar
    216 posts
    Registered:
    21 Nov 2016
    27 Oct 2009
    Link to this post
    Hello sean2078,

    You can try this:
    1. Override Telerik.Cms.Web.InternalPage.
    2. Clear the Reponse Headers.

    How to:
    1. In the App_Code create class CustomInternalPage like this:

    public class CustomInternalPage : Telerik.Cms.Web.InternalPage
    {
        protected override void SetAspNetCachebility(System.Web.Caching.CacheDependency dependency, Telerik.Caching.ICacheSettings cacheSettings)
        {       
            base.SetAspNetCachebility(dependency, cacheSettings);       
            this.Response.ClearHeaders();       
        }  
    }

    2. Open ~Sitefinity/cmsentrypoint.aspx and change it like this:
    <%@ Page Inherits="CustomInternalPage" MasterPageFile="~/Sitefinity/Dummy.master" %>

    Just to let you know the response time in forums is within 72 hours. You received your reply after 30 hours which is less than half of the time in accordance of your support policy.

    Regards,
    Nikolai
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  4. sean2078
    sean2078 avatar
    7 posts
    Registered:
    14 Nov 2004
    27 Oct 2009
    Link to this post
    Very much appreciate the response.  Will give this a try.

    Thanks for the assistance and fast turn-around Nikolai,
    Sean
  5. sean2078
    sean2078 avatar
    7 posts
    Registered:
    14 Nov 2004
    27 Oct 2009
    Link to this post
    That worked.  Odd that we would even need to put that in place since we're using an out-of-the-box installation, but we're good to go now nonetheless. :)

    Thanks again to Nikolai and the entire Sitefinity team
Register for webinar
5 posts, 0 answered