By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,278 Members | 1,329 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,278 IT Pros & Developers. It's quick & easy.

about cache method in firefox 3

P: 16
Hello,

Is it true that Firefox 3 always cache pages so this code just completely ignored in my code:

Expand|Select|Wrap|Line Numbers
  1. header("Cache-Control: no-cache, must-revalidate"); 
  2. header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); 
but, i read from this forum

http://forums.mozillazine.org/viewtopic.php?f=25&t=673135

it turns out that this html code works!

Expand|Select|Wrap|Line Numbers
  1. <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
Why is that?

I tried another browser like IE7, GChrome, Safari, Opera. They work with the php code (thus the html code not necessary). But in FF3 it just don't work

Anybody experiencing the same thing?
Oct 24 '08 #1
Share this Question
Share on Google+
3 Replies


Atli
Expert 5K+
P: 5,058
Hi.

Like I said in one of your earlier threads; you can never trust a browser to do what it is told. You should treat headers, like the cache control headers, like suggestions and never have your page assume they actually work. Code assuming that they don't and consider it a bonus when they do.

Having said that, if you know the Pragma header works in FF3, you could simply add that header to your PHP code:
Expand|Select|Wrap|Line Numbers
  1. header("Pragma: no-cache");
  2.  
That should work fine.
Oct 24 '08 #2

P: 16
Yes, thanks Atli.

Now as i progressing in my project, i realize that one browser renders differently from another browser, even when i follow the w3c standards. It's really time-consuming to get every browser available displays what i want.

Thanks Atli...
Oct 25 '08 #3

Atli
Expert 5K+
P: 5,058
Yea. Trying to get the browser to render your pages consistently is a challenge.
Although, IE tends to be the biggest problem. It simply doesn't use any of the web-standards properly.

The best method is to simply code to standards. That way all decent browsers should render it correctly.
Then you only need to worry about finding the fixes required to get IE to understand it.

A lot of people make the mistake of designing for IE first and the trying to fix it for the other browsers. That is the worst thing you can do, because to get things working in IE you need to use *broken* code. Trying to find workarounds to get *broken* code to work in proper browsers is much much harder than to get proper code working in broken browsers.
Oct 25 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.