SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast Ian's Avatar
    Join Date
    Sep 2000
    Location
    UK - Yorkshire
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, is there some code I can put into my pages/site so that the end users browser loads the latest version of the site...Thanks.

  2. #2
    SitePoint Enthusiast swoosh's Avatar
    Join Date
    Aug 2000
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Auto Refresh Page

    Ian, I think you can do just that by using META tags. Now, if I remember right, here's an example META tag which will refresh a page every 5 seconds. Customize as you need:

    Code:
    <META http-equiv="refresh" content="5"; url="putURLHere">
    Just put it beetween your HEAD tags and you should be all set.

    Hope that helps.

    [Edited by swoosh on 11-01-2000 at 09:04 AM]

  3. #3
    Carpe Chicken Chicken's Avatar
    Join Date
    Jul 2000
    Posts
    1,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Ian
    Hi, is there some code I can put into my pages/site so that the end users browser loads the latest version of the site...Thanks.
    What does auto refresh have to do with loading the latest version of your site???
    HostHideout.com - Where professionals discuss web hosting.
    Chicken

  4. #4
    SitePoint Wizard jumpthru's Avatar
    Join Date
    Apr 2000
    Location
    Los Angeles, California
    Posts
    1,008
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea, using meta to refresh will only cause the page to keep refreshing every five seconds and that would get annoying. There is header code you can put to force the brower to get a current copy and not use a cached copy. Maybe someone else knows what it is though, I cant remember.

  5. #5
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you guys might have been thinking of....

    http://www.w3.org/TR/html4/struct/global.html#h-7.4.4

    If you look a little bit further below in that page (I originally posted this a few days ago but now I can't find it again) you'll find the correct code for forcing a page to expire and make the browser go back to the site to get the latest version.


    Code:
    <head>
    <META http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT"></head>
    I think this was what Ian was looking for?

    My 2 Cents (or is that 2.2 Cents including GST?)

  6. #6
    Carpe Chicken Chicken's Avatar
    Join Date
    Jul 2000
    Posts
    1,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think so BC. Ian, auto-refesh can be used on splash pages (no comment), and sometimes with chat scripts, but you don't want to use it for loading current versions of the site/page.
    HostHideout.com - Where professionals discuss web hosting.
    Chicken

  7. #7
    SitePoint Enthusiast Ian's Avatar
    Join Date
    Sep 2000
    Location
    UK - Yorkshire
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys, I have the info now, better test it.

  8. #8
    SitePoint Enthusiast swoosh's Avatar
    Join Date
    Aug 2000
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by jumpthru
    Yea, using meta to refresh will only cause the page to keep refreshing every five seconds and that would get annoying. There is header code you can put to force the brower to get a current copy and not use a cached copy. Maybe someone else knows what it is though, I cant remember.
    Could this be the right header code, jumpthru? I hope I remember right:

    Code:
    <meta http-equiv="expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache">
    This piece of code should prevent your site to be cached and ensure your visitor to see the latest version of your site. There is an article about this right here on SitePoint (WebmasterBase.com) called Everything You Need to Know About Meta Tags. It explains various meta tags, including the ones above.

  9. #9
    Kat's Meow Senior ******* WebKat's Avatar
    Join Date
    Jul 1999
    Location
    California USA
    Posts
    1,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ~Thanks to Michael~
    He has shown that you can find what you need to know right here at SitePoint ~
    Dlynn :: SitePoint Senior Advisor ::
    PawPrint Designs by WebKat
    "Dogs come when they're called; Cats take a message and get back to you later." ~ Mary Bly


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
  •