Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6699283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:40:37+00:00 2026-05-26T06:40:37+00:00

A client’s website has an auto-refresh feature which works great for desktop sites, but

  • 0

A client’s website has an auto-refresh feature which works great for desktop sites, but I’m making an iPhone app and need to disable it on the mobile version.

The code used is:

<META HTTP-EQUIV="REFRESH" CONTENT="30">

I would like to use javascript to disable it, if possible.

Thanks.

EDIT:
I DO NOT have access to the HTML file, and therefore can’t modify it. I need to do this via code on the Objective-C side in Xcode.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:40:37+00:00Added an answer on May 26, 2026 at 6:40 am

    Assuming you are using a UIWebView to display the site, you could use [webView stringByEvaluatingJavaScriptFromString:@"..."];, where “…” is this javascript:

        var metaTags = document.getElementsByTagName("META");
        for(var i = 0; i < metaTags.length; i++) {
            if (metaTags[i].getAttribute("HTTP-EQUIV").match(/^REFRESH$/i))
                metaTags[i].parentNode.removeChild(metaTags[i]);
        }
    

    Condensed down to one line for convenience:

    var metaTags = document.getElementsByTagName("META"); for(var i = 0; i < metaTags.length; i++) { if (metaTags[i].getAttribute("HTTP-EQUIV").match(/^REFRESH$/i)) { metaTags[i].parentNode.removeChild(metaTags[i]);}}
    

    Edit: Well…after all that, turns out it’s not possible to cancel an existing refresh request by simply removing the meta tag from the document. Once the parser sees the meta tag, it will refresh regardless of any javascript trickery you do. Unfortunately, the only way to overcome this is to modify the HTML page directly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A client has asked for additional security for a web app which would allow
client.on('message', function(obj){}); This works fine, but I am trying to avoid nesting, so I
Client has sendpoints() method which is called by some other class that I did
A client has a website running on a dedicated host (either developed, nor managed
My client has their domain name (lorem.com) registered with company X which also host
Client is requesting a Lightbox gallery which will, on click, provide image, description and
Client is requesting a single track to be heard across the website. Generally I
Client has asked that a whole div is dragable, the div contains some text
My client's network security person is setting up their new website in a DMZ
Each client on the site has his own composition of HTML elements. Some may

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.