Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How do u make a page reload if u hit the back button?

sprockettsprockett New
edited January 2006 in Vanilla 1.0 Help
What i love about vanilla is that when i hit back button, the previous page loads entirely from scratch.... How is this done? I am coding a photogallery, and when a user submits an image, and hits back button, i want it to refresh so he see's his loaded photo... How does vanilla do it? Thanks!


  • Options
    i tried using pragma nocache, but that doesnt work.. :(
  • Options
    I think we need to distinguish server-side caching and client-side caching.
  • Options
    Oops.. sorry i wasnt more specific, i mean client-side caching.. basically, just like vanilla, if i hit back button, the browser should send in a request to the server.... Right now for my own script, it just loads it from the browser cache...
  • Options
    edited January 2006
    On IE you need to add

    <META HTTP-EQUIV="Expires" CONTENT="-1">
  • Options
    MarkMark Vanilla Staff
    Take a look at appg/headers.php
  • Options
    browsers are dumb
  • Options
    lechlech Chicagoland
    it's all in the headers, when the form submits, it submits your data to this thread assigning it this ID (for this thread) then calls headers to refresh this thread instead of sending you elsewhere. While you could just as easily get thrown back to anywhere else you wish depending on the actions you assign to that header file :)
  • Options
    This is what I use. It's perfect, <?php header('Expires: ' . time() - 1000); header('Pragma: private'); header('Cache-Control: no-cache, must-revalidate'); ?> OR <?php function DisableCache() { 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-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); } ?>
  • Options
    thank you everyone!! I got my headers in action.... :P
This discussion has been closed.