Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    Regular Coder
    Join Date
    Oct 2002
    Posts
    147
    Thanks
    31
    Thanked 2 Times in 2 Posts

    is it possible to auto refresh onload

    how can i make the viewer

    load my latest updated index.htm

    file on my site

    and not the cashed one

    so they have to refresh(f5)

    is it possible and if so how?

    thanks

    andrew

  • #2
    New to the CF scene
    Join Date
    Nov 2002
    Location
    Minnesota, USA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Defeating cache

    Virtually all browsers perform conditional GET requests, where the browser asks the server for the document, but only if modified since a certain date. Therefore, every page view should be getting the latest version of your document. Note that browsers may be configured to check documents for date only once per session (as opposed to every fetch request), so some users may not see the refreshed content. You can use

    <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">

    in your HTML to hint to the browser that it should not cache the page content, but that will force delivery of the full page every hit, which will mean higher server loads.

  • #3
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Will the no cache tags do not work that great for most browsers! So there is a way to do it with javascript!

    Look at this page and it will say what you need to do.

    http://www10.brinkster.com/a1ien51/S...achescript.htm

    A1ien51

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    This is set for half a second...Use 1000 for one sec, 5000 for 5 seconds, etc.

    <script>
    window.onload = function() {
    if (!window.location.search) {
    setTimeout("window.location+='?refreshed';", .5);
    }
    }
    </script>
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    META no-cache tags are no use; not only are they not universally understood, but they are not read at all by proxy-servers, which means a proxy can still cache the page.

    Zoobie's js method looks good; you can also do it with PHP by sending out these headers before the <html> tag:

    <?
    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");
    ?>
    Last edited by brothercake; 11-29-2002 at 01:41 PM.

  • #6
    Regular Coder
    Join Date
    Oct 2002
    Posts
    147
    Thanks
    31
    Thanked 2 Times in 2 Posts
    i have no say on on the sitebeing loaded

    al i want is for my link to load the latest version on my clients
    computer


    anyone got any other ideas
    andrew

  • #7
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Internet Explorer

    You can lead a horse to water...
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #9
    New Coder hedbanger's Avatar
    Join Date
    Jun 2002
    Location
    vallejo, ca
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    alien51,
    how do you make your script work with a form button instead of a text link?
    jf~ if you're not part of the solution, you're part of the precipitate.

  • #10
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    <input type="button" onclick="NewSession('http://www10.brinkster.com/A1ien51',2)" value="HMM">

    ????

  • #11
    New Coder hedbanger's Avatar
    Join Date
    Jun 2002
    Location
    vallejo, ca
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks. does the bit below look correct, to you then?

    <input name="submitc" type="submit" id="submitc" onClick="MM_openBrWindow, NewSession('5.htm','table486');javascript:self.close();" value="SUBMIT" />
    jf~ if you're not part of the solution, you're part of the precipitate.


  •  

    Posting Permissions

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