Disable page caching without disabling caching of jpegs andstylesheets etc

  • Thread starter Thread starter JimLad
  • Start date Start date
J

JimLad

Hi,

We have a data based web app that basically must not cache any of the
pages as they contain real time data.

I am currently using the following line in the page template on the
PreInit event:
Response.Cache.SetCacheability(HttpCacheability.NoCache)

Will this prevent things like Jpegs and CSS stylesheets from being
cached as well?

If so is there another way of doing this?

Cheers,

James
 
JimLad said:
We have a data based web app that basically must not cache any of the
pages as they contain real time data.

I am currently using the following line in the page template on the
PreInit event:
Response.Cache.SetCacheability(HttpCacheability.NoCache)

Will this prevent things like Jpegs and CSS stylesheets from being
cached as well?

If so is there another way of doing this?

In IIS, you can set content to expire immediately, e.g. for IIS 6.0:
http://www.microsoft.com/technet/pr...fe7-be45-4033-a5aa-d7fda3c993ff.mspx?mfr=true

Andrew
 
no, it only disables it for the current response content. as every image
is its own request/respone, the cache header set when the image is fetched.

-- bruce (sqlwork.com)
 
no, it only disables it for the current response content. as every image
is its own request/respone, the cache header set when the image is fetched.

-- bruce (sqlwork.com)








- Show quoted text -

Thanks guys. I realised I didn't explain myself very well. I want
jpegs and stylesheets to be cached but not the page content itself so
sounds like I'm doing it the right way.

Many thanks,

James
 
Back
Top