Refresh

Discussion in 'HTML' started by John, Nov 17, 2003.

  1. John

    John Guest

    Hi!
    I don't know wheather I should post this in a HTML newsgroup or in a ASP
    one.So excuse me for posting in both.
    I have written some code using ASP.
    When I use F5 and <meta httpd-equiv="refresh" content="1"> the result is not
    the same.
    Is there any difference between the two?

    Thnx in advance
     
    John, Nov 17, 2003
    #1
    1. Advertising

  2. John wrote:
    > Hi!
    > I don't know wheather I should post this in a HTML newsgroup or in a
    > ASP one.So excuse me for posting in both.


    ok - crossposting would be better than multi-posting

    > I have written some code using ASP.
    > When I use F5 and <meta httpd-equiv="refresh" content="1"> the result
    > is not the same.
    > Is there any difference between the two?


    What is F5 in this context? refresh browser?

    neither are ASP issues though.

    --
    William Tasso - http://WilliamTasso.com
     
    William Tasso, Nov 17, 2003
    #2
    1. Advertising

  3. "John" <reply_to_group@stop_spam.com> wrote in message
    news:bp9vvg$1oni$...
    > Hi!
    > I don't know wheather I should post this in a HTML newsgroup or in a ASP
    > one.So excuse me for posting in both.
    > I have written some code using ASP.
    > When I use F5 and <meta httpd-equiv="refresh" content="1"> the result is

    not
    > the same.
    > Is there any difference between the two?


    The problem with the meta refresh is that it does not work always. I ran
    into that problem a while ago with PHP programming. I wanted my browser
    window to refresh every time it opened, but the meta tag just wasn't good
    enough. In particular when using the "Back" button of the browser - the
    window would stay the same.

    I found this really great tip on how to do it with PHP - not quite sure
    whether you can achieve the same with ASP - it is header functions. You send
    a raw HTTP header that forces the browser to refresh every time. It worked
    for all browsers I could test except for Safari on the Mac.

    Hope this helps.
     
    Fredo Vincentis, Nov 17, 2003
    #3
  4. John

    Kris Guest

    In article <bpa8cv$sd8$>,
    "Fredo Vincentis" <> wrote:

    > I found this really great tip on how to do it with PHP - not quite sure
    > whether you can achieve the same with ASP - it is header functions. You send
    > a raw HTTP header that forces the browser to refresh every time. It worked
    > for all browsers I could test except for Safari on the Mac.


    I have never experienced anything like that. I can almost certainly say
    that the Location header is supported in Safari.

    --
    Kris
    erlands (nl)
     
    Kris, Nov 17, 2003
    #4
  5. Fredo Vincentis wrote:

    > I found this really great tip on how to do it with PHP - not quite sure
    > whether you can achieve the same with ASP - it is header functions. You send
    > a raw HTTP header that forces the browser to refresh every time. It worked
    > for all browsers I could test except for Safari on the Mac.


    You can't force a browser to do anything, as you discovered with Safari
    (and Konqueror too, I'm guessing).
     
    Leif K-Brooks, Nov 17, 2003
    #5
  6. "Kris" <> wrote in message
    news:4all.nl...
    > In article <bpa8cv$sd8$>,
    > "Fredo Vincentis" <> wrote:
    >
    > > I found this really great tip on how to do it with PHP - not quite sure
    > > whether you can achieve the same with ASP - it is header functions. You

    send
    > > a raw HTTP header that forces the browser to refresh every time. It

    worked
    > > for all browsers I could test except for Safari on the Mac.

    >
    > I have never experienced anything like that. I can almost certainly say
    > that the Location header is supported in Safari.


    Hmmm... The header location works, but the header expires doesn't work in
    Safari when I use the Back button of the browser. I'll show you what I mean:

    if you go to http://www.addictivemedia.com.au you will see a Flash menu at
    the top. Click onto Company>Management. You will see that the Flash menu
    remains highlighted to show the user the section he is in. Now go to
    Portfolio>Case Study. If you now use the Back button to go back to
    Company>Management, you will notice that the Flash menu highlights the wrong
    section. This is because Safari does not reload the page (the Flash menu is
    driven by the PHP).

    Strange, but it only causes problems in Safari. If you know a solution,
    would be great to hear (sorry to the guys who come here for HTML, rather
    than PHP). This is the code I use at the moment to force refresh:

    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    // always modified
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    // HTTP/1.1
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    // HTTP/1.0
    header("Pragma: no-cache");
     
    Fredo Vincentis, Nov 18, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bryan G
    Replies:
    1
    Views:
    468
    Jason Coyne Gaijin42
    Apr 3, 2004
  2. brian lanning
    Replies:
    0
    Views:
    629
    brian lanning
    Jul 29, 2003
  3. Per Magnus L?vold
    Replies:
    1
    Views:
    5,210
    John C. Bollinger
    Oct 8, 2004
  4. Pkenty
    Replies:
    0
    Views:
    434
    Pkenty
    May 28, 2004
  5. Jawahar Rajan
    Replies:
    1
    Views:
    309
    Adrienne
    Oct 1, 2003
Loading...

Share This Page