1

I have to set cache-control header to "no-cache, no-store".For this i am using html meta tag

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>

in the tag of the web page. I inspected in firebug. In spite of having cache-control to desired one it is having as "private". I am using ASP.NET framework. Any idea why this is failing?

1
  • Do you mean the HTTP headers when you say "header section of the web page"? Commented Jul 8, 2011 at 13:32

1 Answer 1

2

from code behind you add:

 Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetNoStore();
Sign up to request clarification or add additional context in comments.

1 Comment

I specifically had a problem where in IE (only) the content of Colorbox iframes was being cached under the private setting and this cleared up the problem. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.