index.php no-cache problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Oliver
    New Member
    • Jul 2001
    • 22

    index.php no-cache problem

    We have no-cache headers switched on in general options. When someone lands on the board on index.php, they still see the version from their cache?

    If they land on index.php?s= they get the latest page?

    How do we stop index.php from caching in the browser? is it a host problem, i.e. are they caching the page with a proxy or something? surely this should update as proxy checks for a newer version of the page?

    Regards
    Oli

    vB 2.0.0, linux, host: www.oneandone.co.uk
  • Mike Sullivan
    Former vBulletin Developer
    • Apr 2000
    • 13327
    • 3.6.x

    #2
    I've noticed occasionally that IE will ignore anything I've set and just pull up the cached version of the page. I'm not sure exactly why.

    What you could do is stick this code at the top of index.php (after <?php):

    Code:
    if (!isset($s)) {
      header("Location: index.php?s=");
      exit;
    }
    That's untested, but I don't think it'll create an infinite loop or anything

    Comment

    • Oliver
      New Member
      • Jul 2001
      • 22

      #3
      thanks Ed,

      whenever someone goes to http://bcvx.com/vb/index.php the page loads index.php?s=.

      Is this analogous <sp> to setting up a page re-direct? just in php code.

      Not sure what you mean by an infinite loop, how would that affect the board?

      regards
      oli

      Comment

      • Mike Sullivan
        Former vBulletin Developer
        • Apr 2000
        • 13327
        • 3.6.x

        #4
        Is this analogous <sp> to setting up a page re-direct? just in php code.
        That is a page redirect But it's just done through direct PHP headers.

        Not sure what you mean by an infinite loop, how would that affect the board?
        If it looped index.php through that over and over you'd never be able to load the index.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...