PC Review


Reply
Thread Tools Rate Thread

Disable page caching without disabling caching of jpegs andstylesheets etc

 
 
JimLad
Guest
Posts: n/a
 
      20th Jan 2010
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
 
Reply With Quote
 
 
 
 
Andrew Morton
Guest
Posts: n/a
 
      20th Jan 2010
JimLad wrote:
> 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/pro....mspx?mfr=true

Andrew


 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      21st Jan 2010
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)

JimLad wrote:
> 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

 
Reply With Quote
 
JimLad
Guest
Posts: n/a
 
      21st Jan 2010
On 21 Jan, 01:44, bruce barker <nos...@nospam.com> wrote:
> 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)
>
>
>
> JimLad wrote:
> > 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- Hide quoted text -

>
> - 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling page caching not working pradeep_TP Microsoft ASP .NET 2 12th Apr 2008 06:00 AM
Disabling Thumbnail caching =?Utf-8?B?SmFtZXMgTA==?= Windows Vista File Management 2 27th Jun 2007 01:40 AM
Disabling page caching in Firefox with .net 2 Jeff Microsoft VB .NET 0 25th Sep 2006 02:22 PM
Re: Disabling caching on shut down Kelly Windows XP General 2 21st Aug 2004 08:03 AM
Fragment Caching inside page caching? Troy Simpson Microsoft ASP .NET 0 19th Jan 2004 11:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:52 AM.