SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast Yonko's Avatar
    Join Date
    Jun 2001
    Location
    Panama
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP page doesn't auto-reload

    I need help, I have a news page (noticias.php) which is supposed to reload every time the user enters. This page runs inside a _parent frame, so I was wondering if that was the problem. If I write the exact url of the page (http://www.rcmtelevision.com/noticias.php), it loads the latest version. I already tried this:

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="expires" content="-1">

    and this (second head area):
    </body>
    <head>
    <meta http-equiv="pragma" content="no-cache">
    </head>
    </html>

    Already changed the settings in IE to make the browser for a new version on every visit.

    Please help.

  2. #2
    will code HTML for food Michel V's Avatar
    Join Date
    Sep 2000
    Location
    Corsica
    Posts
    552
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try placing this at the very beginning of the file:

    PHP Code:
    <?php
    header
    ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    header("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    ?>
    This might help.
    [blogger: zengun] [blogware contributor: wordpress]

  3. #3
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This is what I use, except that instead of the third header above I use

    header("Cache-Control: no-store, no-cache, must-revalidate");

    I'm not sure if the no-store makes much of a difference.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  4. #4
    SitePoint Evangelist
    Join Date
    Dec 2000
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about this:
    PHP Code:
    header("location: http://www.rcmtelevision.com/noticias.php"); 
    Replace the URL with whatever the URL of the page you want to reload is.

    Hope that helps!

    -Corbb
    Corbb O'Connor
    Looking for quality website design or database programming?
    Contact me for more information and a FREE quote!

  5. #5
    SitePoint Enthusiast Yonko's Avatar
    Join Date
    Jun 2001
    Location
    Panama
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks again

    Thanks for your advice, people. Hope I can help you back some day.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •