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 8090081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:36:02+00:00 2026-06-05T19:36:02+00:00

I am working on a logic where I want user to be redirected to

  • 0

I am working on a logic where I want user to be redirected to a particular page if JavaScript is not enabled. I have put a meta-tag which will refresh every few seconds and if JavaScript is enabled and I want to use JavaScript to remove that element.

I have tried many things but I have been unsuccessful in removing the tag. Also I tried to empty the content of the tag but it still redirects.

Is there any other way to deal with this issue?

I am posting some code for you to take a look, I just grabbed it from the web but seems to be emptying the contents when I debug through the code:

var m = $('meta');

for (var c = 0; c < m.length; c++) {
    m[c].parentNode.removeChild(m[c]);
    m[c].content = '';
}

I am also open to a server side solution but the client does not send much information such as if javaScript is enabled or not…….

  • 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-06-05T19:36:04+00:00Added an answer on June 5, 2026 at 7:36 pm

    Try this:

    // THIS DOES NOT WORK
    $( 'meta[http-equiv="refresh"]' ).remove();
    

    It certainly depends on how soon your jQuery code executes and how soon your refresh triggers…

    Update: The above method does not work. Even though the meta element is removed from the DOM, the browser still executes the refresh.

    Live demo: http://www.ecmazing.com/misc/test-removing-meta-element/


    I believe you should also be able to do this:

    <noscript>
        <meta http-equiv="refresh" content="..."> 
    </noscript>
    

    So, if you wrap your meta element in a NOSCRIPT element, it should only be parsed if JavaScript is disabled.

    Read about the NOSCRIPT element here: https://developer.mozilla.org/en/HTML/Element/noscript

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

Sidebar

Related Questions

I'm working on a login page, I want the user to see his name
I want the user to be redirected to a particular webpage after logging in
I'm working with Django. I have an HTML page, where I do some Javascript
OK so I am working on some game logic, I have done a fair
I am working in a Login page and teh logic is like -> try
I am working on an artificial intelligence project which is a logic game and
I am struggling to get my LogIn/Registering system working. I have a register.aspx page
Here is my use cases. I have a login page which is /public/login.xhtml .
I want to set up a login page in which from anywhere on the
I have a root_path on my Rails application that is not user-protected i.e. it's

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.