about cache method in firefox 3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • agun
    New Member
    • Oct 2008
    • 16

    #1

    about cache method in firefox 3

    Hello,

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

    Code:
    header("Cache-Control: no-cache, must-revalidate"); 
    header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
    but, i read from this forum

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

    it turns out that this html code works!

    Code:
    <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?
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    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:
    [code=php]
    header("Pragma: no-cache");
    [/code]
    That should work fine.

    Comment

    • agun
      New Member
      • Oct 2008
      • 16

      #3
      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...

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        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.

        Comment

        Working...