Forum Moderators: open

Message Too Old, No Replies

How do I make html pages avoid local cache?

I do want a local cache for the pages

         

AjiNIMC

9:58 am on Jan 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

My pages show two different version, one for logged out state and other for logged in state.

I have added following lines to my html files,


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

Problem:
One I am logged in , it still shows the logged out state pages. The pages are going to the local cache (PC cache), why so? What should I do over here? When I press ctrl+f5 the cache is cleared and I see a logged in page.

Please help.

Regards,
AjiNIMC

tedster

11:38 pm on Jan 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is there a way to have a slightly different URL for the logged-in state?

AjiNIMC

2:13 am on Jan 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just want to keep the same URL. As per the cache system the file exists in the FileSystem on our server, if the person is logged in then only we show the pages dynamically.

encyclo

2:59 am on Jan 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do I understand correctly that you have implemented a caching system server-side for your generated content? If that is the case, the it is server-side (and not with in-page meta tags) that you can solve the caching issue.

Two possible ways are to use Apache mod_expires settings to disallow caching via HTTP headers. The second is to use server-side scripting (PHP, ASP...) so send the no-cache/must-revalidate HTTP headers with each page request.

AjiNIMC

7:55 am on Jan 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



when I press ctrl+f5 it shows me the latest page.

AjiNIMC

9:44 am on Jan 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



when I say local cache I mean the browser cache.

IrishRover

1:53 pm on Jan 25, 2006 (gmt 0)



May be problem is in cookies?