Results 1 to 5 of 5

Thread: Refresh

  1. #1
    Join Date
    Apr 2005
    Posts
    49
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Refresh

    Not sure if this is in the right place.

    How do I make my webpages refresh automatically when they are loaded on a users pc.

    I run a website which has a quiz via email. When I upload the new quiz and old answers etc, the users have to manually refresh their pages otherwise they see last weeks quiz and not the new one.

    Any help would be appreciated

    Thanks

  2. #2
    Join Date
    Jul 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Quiz
    When some one is Opening a Website the Contents of the website are reloaded
    Only the Offline content is Static and once connected it changes to the current changes on the website

    can u please be a Lil more breif about the Question you have Submitted

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It's because it's been cached. Add:
    HTML Code:
    <meta http-equiv="pragma" content="no-cache"/>
    <!-- For HTTP/1.0-compliant browsers -->
    
    <meta http-equiv="cache-control" content="no-cache"/>
    <!-- For browsers that support HTTP/1.1 -->
    to the <head> of any pages where this occurs.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    Add:
    HTML Code:
    <meta http-equiv="pragma" content="no-cache"/>
    <!-- For HTTP/1.0-compliant browsers -->
    As a matter of interest, NN4 is about the only browser remaining in use that doesn't support HTTP/1.1. Roll on the death of NN4!

    That said, I don't know about the state of proxies, but that's a separate issue and needs to be addressed again in a moment.

    HTML Code:
    <meta http-equiv="cache-control" content="no-cache"/>
    <!-- For browsers that support HTTP/1.1 -->
    to the <head> of any pages where this occurs.
    Browsers do not have to respect meta elements that intend to represent HTTP headers. In fact the purpose of this type of use was so that servers could scan the head element of documents, looking for http-equiv attributes that it could translate into real headers.

    Furthermore, even if meta elements were reliably respected by browsers, they aren't the only concern. People do use caching servers, and content providers like AOL move almost all data through these proxies (see AOL Caching Info). Therefore, if you need to control caching behaviour, you must do it properly via HTTP headers.


    What the OP should really check is what expiry data (Expires header and Cache-Control: max-age= directive) is sent along with this quiz. In addition, do the validators (Last-Modified and ETag headers) change when the content changes.

    Caching is beneficial to both authors and clients, and shouldn't be halted entirely unless really necessary.

    Mike
    Last edited by mwinter; 08-30-2005 at 04:26 PM. Reason: Correcting quoted portion

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Browsers do not have to respect meta elements that intend to represent HTTP headers. In fact the purpose of this type of use was so that servers could scan the head element of documents, looking for http-equiv attributes that it could translate into real headers.
    You live and you learn.
    I don't agree with the "nobody uses this so let's not support it" idea, though. When it's a question of recoding the whole page or making it drastically less efficient for others, maybe one could not support it. When it's just a case of adding a few bytes to the page size, though, it's always worth it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •