Page 1 of 1

Pages caching in Firefox - HELP!

Posted: Sun 23 Oct 2011 11:32 pm
by CalonDdraig
Hello,

I've been having some problems with the pages generated by Cumulus being cached by firefox - no matter what I try to do, nothing works. IE and Chrome are fine, but Firefox needs manually refreshing to make the recent upload show. This is especially true of the graphs on the 'trends' page - those tend to need a CTRL + F5 to update.

In the header of all my pages I have these tags:

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="0">
<META HTTP-EQUIV="REFRESH" CONTENT="60">

...But they don't seem to make any difference.

Here's the link to our cumulus site: http://weather.trigonos.org/cumulus/index.htm

I know other people have had these problems, but adding 'no cache' tags hasn't solved them for us. Anyone know of anything we can do to force firefox to always get a new copy from the server?

Thanks in advance,

~CalonDdraig

Re: Pages caching in Firefox - HELP!

Posted: Mon 24 Oct 2011 10:32 am
by steve
Your web server is sending 'expires' headers for two weeks hence:

Date: Mon, 24 Oct 2011 10:19:02 GMT
Expires: Mon, 07 Nov 2011 10:19:02 GMT

Firefox appears to be ignoring your http-equiv headers; this is probably because they are invalid. Running your index page through the HTML validator gives this for the first error:

Error Line 6, Column 18: there is no attribute "HTTP-EQUIV"

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Re: Pages caching in Firefox - HELP!

Posted: Mon 24 Oct 2011 11:37 am
by CalonDdraig
Thanks for that Steve, I'll adjust/tidy up my html later - hope this fixes things.

Is there a way to make my server send earlier 'expires' headers at all? Or is this beyond my control?

Kindest regards and keep up the good work with Cumulus! Token of my apriciation in your paypal donations account!

~CalonDdraig

Re: Pages caching in Firefox - HELP!

Posted: Mon 24 Oct 2011 11:50 am
by steve
You might be able to do it by adding the following to a .htaccess file in the root of your web space:

Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"

But we're right at the limit of my knowledge now!

Re: Pages caching in Firefox - HELP!

Posted: Mon 24 Oct 2011 4:49 pm
by CalonDdraig
Hi Steve,

Thanks for the tip with .htaccess - I don't actually need my meta tags now, so I can remove them and have it validate as strict. The .htaccess has stopped any caching that I can see and it always appears fresh whenever you visit the page.

Thanks!

~CalonDdraig