PHP and Internet Explorer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jørn Dahl-Stamnes

    PHP and Internet Explorer

    Internet Explorer is making me crazy. Things that works OK with FireFox,
    does not work properly with IE.

    Situation:
    PHP script A have a link to a PHP script B. Script B changes some $_SESSION
    variables and then do a re-direct back to script A.

    With FireFox, the page is refreshed when I click on the link to script B and
    the results have be seen. But with IE, the page is not refreshed, so the
    changes made due to changes in the session variables, is not visible for
    the user. I have to press F5 or click on the Refresh-button in the toolbar
    to make the changes visible.

    Any hints about what I can do to force a refresh of the page?

    Thanks.

    --
    Jørn Dahl-Stamnes

  • feo

    #2
    Re: PHP and Internet Explorer

    Maybe different cache configurations between IE and FF? Not always blame it
    on IE. If you need to press F5, then what you're seeing is the cached page,
    I think. Review Tools > Internet properties > General > Internet temporary
    files > Configuration.

    Hope it helps.

    feo

    "Jørn Dahl-Stamnes" <newsmanDELETE@ REMOVEdahl-stamnes.net> escribió en el
    mensaje news:43bd1fed@n ews.broadpark.n o...[color=blue]
    > Internet Explorer is making me crazy. Things that works OK with FireFox,
    > does not work properly with IE.
    >
    > Situation:
    > PHP script A have a link to a PHP script B. Script B changes some
    > $_SESSION
    > variables and then do a re-direct back to script A.
    >
    > With FireFox, the page is refreshed when I click on the link to script B
    > and
    > the results have be seen. But with IE, the page is not refreshed, so the
    > changes made due to changes in the session variables, is not visible for
    > the user. I have to press F5 or click on the Refresh-button in the toolbar
    > to make the changes visible.
    >
    > Any hints about what I can do to force a refresh of the page?
    >
    > Thanks.
    >
    > --
    > Jørn Dahl-Stamnes
    > http://www.dahl-stamnes.net/dahls/[/color]


    Comment

    • Jørn Dahl-Stamnes

      #3
      Re: PHP and Internet Explorer

      feo wrote:[color=blue]
      > Maybe different cache configurations between IE and FF? Not always blame
      > it on IE. If you need to press F5, then what you're seeing is the cached
      > page, I think. Review Tools > Internet properties > General > Internet
      > temporary files > Configuration.
      >
      > Hope it helps.[/color]

      No, it did not.
      I tired to add:
      META http-equiv="Expires" content="-1" (tried other values too)

      And it seems to help a bit. But still, sometime it does not update, while it
      does it other times... It seems to be more randomly...

      Some suggested to add the following text in the pages:
      "Looks good inn any serious HTML-browser - this excludes IEx.x"

      But that is not a solution.

      --
      Jørn Dahl-Stamnes

      Comment

      • Justin Koivisto

        #4
        Re: PHP and Internet Explorer

        Jørn Dahl-Stamnes wrote:[color=blue]
        > Internet Explorer is making me crazy. Things that works OK with FireFox,
        > does not work properly with IE.
        >
        > Situation:
        > PHP script A have a link to a PHP script B. Script B changes some $_SESSION
        > variables and then do a re-direct back to script A.
        >
        > With FireFox, the page is refreshed when I click on the link to script B and
        > the results have be seen. But with IE, the page is not refreshed, so the
        > changes made due to changes in the session variables, is not visible for
        > the user. I have to press F5 or click on the Refresh-button in the toolbar
        > to make the changes visible.
        >
        > Any hints about what I can do to force a refresh of the page?[/color]

        It is likely due to differences in the way IE reads headers compared to
        other browsers... Below is what I have been using for other purposes
        that are similar. However, I haven't tested this exact case.

        header('Expires : '.gmdate('D, d M Y H:i:s').' GMT');

        // USER_AGENT_IE is a constant defined earlier in the script if we could
        // tell that the user is (or wants us to think they are) using internet
        explorer.
        if(USER_AGENT_I E){
        header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
        header('Pragma: public');
        }else{
        header('Pragma: no-cache');
        }

        I'm sure someone in here is more capable than I to explain all the HTTP
        header stuff as I am not an expert in that field by any means...

        --
        Justin Koivisto, ZCE - justin@koivi.co m

        Comment

        • Scot McConnaughay

          #5
          Re: PHP and Internet Explorer

          I don't know if this will help you, but I use this line on each page I
          create with sessions:

          header("Cache-control: private"); // IE 6 Fix.

          Jørn Dahl-Stamnes wrote:[color=blue]
          > feo wrote:
          >[color=green]
          >>Maybe different cache configurations between IE and FF? Not always blame
          >>it on IE. If you need to press F5, then what you're seeing is the cached
          >>page, I think. Review Tools > Internet properties > General > Internet
          >>temporary files > Configuration.
          >>
          >>Hope it helps.[/color]
          >
          >
          > No, it did not.
          > I tired to add:
          > META http-equiv="Expires" content="-1" (tried other values too)
          >
          > And it seems to help a bit. But still, sometime it does not update, while it
          > does it other times... It seems to be more randomly...
          >
          > Some suggested to add the following text in the pages:
          > "Looks good inn any serious HTML-browser - this excludes IEx.x"
          >
          > But that is not a solution.
          >[/color]

          --
          Scot McConnaughay

          Comment

          • Jørn Dahl-Stamnes

            #6
            Re: PHP and Internet Explorer

            Scot McConnaughay wrote:
            [color=blue]
            > I don't know if this will help you, but I use this line on each page I
            > create with sessions:
            >
            > header("Cache-control: private"); // IE 6 Fix.[/color]

            No, it seems like if I click on the link and wait before I click on the link
            again, IE will reload the new page. But I have to wait at least 1-2
            seconds...

            --
            Jørn Dahl-Stamnes

            Comment

            • Michael

              #7
              Re: PHP and Internet Explorer

              Well IE is a problem, if I have a problem with IE and I can not fix it
              quickly i just leave it and tell my visitors to switch to Firefox

              Comment

              • Jørn Dahl-Stamnes

                #8
                Re: PHP and Internet Explorer

                Michael wrote:
                [color=blue]
                > Well IE is a problem, if I have a problem with IE and I can not fix it
                > quickly i just leave it and tell my visitors to switch to Firefox[/color]

                I like your advice... ;-)

                --
                Jørn Dahl-Stamnes

                Comment

                • WebScott

                  #9
                  Re: PHP and Internet Explorer

                  I found an article on Microsoft's site that may help you with this
                  issue. I didn't read through all the details to see if it had anything
                  new that you haven't tried, but hopefully it will have some new
                  suggestions: http://support.microsoft.com/kb/q234067/

                  Comment

                  Working...