Turn off Caching

  • Thread starter Thread starter Robert Strickland
  • Start date Start date
R

Robert Strickland

I wish to turn off browser caching through some meta tags. Note the
following:

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

However, running against my local site, the browser still caches the page
and it's contents. What am I missing?
 
Hi Robert,

Meta tags work only on postback and that too depending on the browser. I
dont think its a good idea to depend on the Metatags for caching...
HTH,

Need any help, do post a msg back..

Happy Coding
 
Thanks for responding.

How do I keep the page, images, etc. from caching on the client machine. We
use .Net Asp.Net. Most pages will have the aspx. extension.
 
There are ways to stop images from caching, but as for as the page text
and other data, I'm not sure if there is much of a way aside from the
meta tags.

However, I'd like to see a solution if there is a way. :)
 
Robert said:
I wish to turn off browser caching through some meta tags. Note the
following:

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">


Does this nonsense never die :-(

Use HTTP Cache-Control headers to control caching, for example:

Response.Cache.SetCacheability(HttpCacheability.NoCache);

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top