Canceling a 'refresh' meta tag

Discussion in 'Javascript' started by Andrew May, Oct 5, 2007.

  1. Andrew May

    Andrew May Guest

    I have a page that is using AJAX type technologies to update some
    elements on a regular basis. As a fallback for browsers that do not
    support XMLHttpRequest I am putting:

    <meta http-equiv='refresh' content='5'>

    in the header to force a refresh of the whole page at regular intervals.

    What I have not been able to find is any way to cancel this whole page
    refresh once I have established that the browser supports
    javascript/XMLHttpRequest.

    Can it be done or am I going about it the wrong way?

    Thanks,

    Andrew
     
    Andrew May, Oct 5, 2007
    #1
    1. Advertisements

  2. Randy Webb wrote:
    > if(ajaxSupported){
    > document.location.href="thisPageWithoutTheMetaTag.php?noRefresh";


    `document.location' has been deprecated long since in favor of
    `window.location'. The `href' property of Location objects was
    tainted in DOM Level 0, and should not be used in order to be
    compatible among DOM-0-supporting UAs.

    window.location = "thisPageWithoutTheMetaTag.php?noRefresh";


    PointedEars
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann
     
    Thomas 'PointedEars' Lahn, Oct 5, 2007
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Hammond

    server-side timer vs. meta refresh

    Jim Hammond, Oct 24, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    6,077
    mikeb
    Oct 27, 2003
  2. aaa
    Replies:
    4
    Views:
    809
  3. shruds
    Replies:
    1
    Views:
    1,259
    John C. Bollinger
    Jan 27, 2006
  4. Nym Pseudo

    META NAME and META HTTP-EQUIV

    Nym Pseudo, Sep 26, 2003, in forum: HTML
    Replies:
    1
    Views:
    852
    =?iso-8859-1?Q?brucie?=
    Sep 26, 2003
  5. Jon Berg
    Replies:
    6
    Views:
    1,283
    Toby Inkster
    Apr 19, 2005
  6. Duane Johnson

    Meta methods to govern meta data?

    Duane Johnson, Oct 25, 2005, in forum: Ruby
    Replies:
    6
    Views:
    542
    Adam Sanderson
    Oct 28, 2005
  7. Erik Veenstra

    Meta-Meta-Programming

    Erik Veenstra, Feb 7, 2006, in forum: Ruby
    Replies:
    29
    Views:
    972
    Erik Veenstra
    Feb 8, 2006
  8. Erik Veenstra

    Meta-Meta-Programming, revisited

    Erik Veenstra, Jul 21, 2006, in forum: Ruby
    Replies:
    21
    Views:
    797
    Erik Veenstra
    Jul 25, 2006
Loading...