INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Browser Cache - Still having problems

Browser Cache - Still having problems

(OP)
Hi again,
I thought everything was ok after Feherke kindly responded to my previous thread on this subject.
However it seems that pages are still being cached when using Firefox.

As stated in previous thread I've included the following meta tags in the head of the html pages that I don't want the browser to cache :-

<meta http-equiv="Expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-control" content="no-cache">

The pages are XHTML 1.0 Transitional html if this has any bearing on the problem.

The site involved is Link

Am I missing something?

Steve
datamasher

RE: Browser Cache - Still having problems

Hi

I already formulated a question about why using meta tags and not sending HTTP response headers, but then I removed the question as it seemed off-topic in the HTML forum. But now I feel I really have to ask it : why ? I see that documents have .html extension, but the source contains dangling indentations, typical for generated content. So are those indeed static documents, or dynamically generated ?

First of all, I would make sure there is no syntax error in the involved tags :

CODE --> ( fragment )

<meta http-equiv="Cache-control" content="no-cache"/> 

Feherke.
feherke.ga

RE: Browser Cache - Still having problems

(OP)
Hi Feherke,
The documents are indeed static. I will look into the syntax though as you may be right that I have included backslashes where I shouldn't have.
Many thanks again for your help. I will have another look at it and will reply with my findings

Steve
datamasher

RE: Browser Cache - Still having problems

Hi

Quote (Steve)

you may be right that I have included backslashes where I shouldn't have.
No, the other way : you missed a slash where should be one. meta tags have no closing pairs, so in XHTML you have to add the self closing slash in front of their closing greater-than sign.

But even with that minor syntax issue, I was unable to reproduce the problem locally. I use Apache, but I find no relevant difference between the HTTP headers. sad

You can try to add more items to the Cache-Control header to enforce the already imposed restriction :
Cache-Control: no-cache, no-store, max-age=0, must-revalidate

Or even more, with Explorer 5-specific things, but this sounds like voodoo to me :
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Feherke.
feherke.ga

RE: Browser Cache - Still having problems

The HTTP/1.1 cache control headers were really intended for caching servers rather than browsers, so while browsers do read such directives they are not necessarily 'obliged' to respond to them.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: Browser Cache - Still having problems

(OP)
Hi Feherke and Chris,
Thanks for your help and advice Feherke and the heads up Chris about browsers not being obliged to adhere to the headers.

I've included the following in the head of my html pages :-

CODE

<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" /> 

and this appears to work in all of the latest versions of the following browsers :-
Firefox, IE, Opera, Chrome and Safari for windows

Many thanks to you guys

Steve
datamasher

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close