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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Trouble with No-cache

    Is there a way to set a password protected page to not cache in a user's browser without making changes to the server settings.
    I've tried all the meta tags that I can find, such as:
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="no-cache">
    <meta http-equiv="Expires" content="-1">
    <meta http-equiv="Cache-Control" content="no-cache">

    And I've also found the following documents pertaining to it:

    http://support.microsoft.com/default...b;EN-US;234067

    http://support.microsoft.com/default...;en-us;q222064

    We are running an old version of Iplanet as a webserver and I don't want to make any changes on that.

    I want the page that is password-protected to expire immediately from the user's cache. No code that I've found yet will make that happen.

    Any help would be appreciated.
    Jason

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Louisiana
    Posts
    576
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the meta no cache tags are very non cross browser and ineffective.
    Originally posted by beetle
    Most still use them...except for Google. They make up their own. This is the site description you see when searching. Like I said before those cache tags probably won't work because most servers disable them now-a-dayz. The most reliable you can do is use both the cache tags & refresh once to update with js:

    This is set for half a second (.5)...Use 1000 for one sec, 5000 for 5 seconds, etc.

    <script>
    window.onload = function() {
    if (!window.location.search) {
    setTimeout("window.location+='?refreshed';", .5);
    }
    }
    </script>

    Title, meta description, then meta keywords.

    SE's can't read javascript. Ha! ha! But they don't need to in order to revisit your updated site.
    i got that from here
    http://codingforums.com/showthread.p...light=no+cache

  • #3
    New to the CF scene
    Join Date
    Dec 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tried that

    I put that in there....Here is the portion of code:

    <html>
    <head>
    <script>
    window.onload = function() {
    if (!window.location.search) {
    setTimeout("window.location+='?refreshed';", .5);
    }
    }
    </script>
    <title>dadadada</title>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">

    This still does not work. Any ideas?

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I use a PHP method - adding these headers to the top of a page, before <html>

    PHP Code:
    <? 
    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"); 
    ?>
    This creates a non-caching page by setting an expiry date in the past.


  •  

    Posting Permissions

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