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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:08:28+00:00 2026-06-08T03:08:28+00:00

Some websites have the annoying quality of auto-refreshing using some JS magic. This seems

  • 0

Some websites have the annoying quality of auto-refreshing using some JS magic. This seems to bypass the browser’s “do not auto refresh” options.

My question – is there a simple way of telling the browser (also via JS, in an add-on) “do not listen to them! Never auto-refresh!”?

EDIT: Just to make myself clear – I want to write a browser extension that prevents the current page from giving a “refresh” signal – whether auto-refresh or “standard” refresh given automatically by the page using some timer. I think that’s a standard JS question…

  • 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-08T03:08:30+00:00Added an answer on June 8, 2026 at 3:08 am

    Edit: Sorry, I missunderstood the question!

    I think that what you need is this:

    window.onkeypress = window.onkeyup = window.onkeydown = function( event ) {
        event.preventDefault();
        // or, in this case: 
        //return false;
    };
    

    When the window will receive the events of keypress, keyup e keydown signals that the default behavior MUST be prevented. If you return false, you will stop the event chain, preventing to execute anything too. The two lines have the same effect, give a try commenting each line.

    Here is a improoved example:

    <!DOCTYPE html>
    <html>
    
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Testing...</title>
        </head>
        <body>
            <div id="clickDiv">Click me ;)</div>
            <br/>
            <input id="typeInput" value="Type something ! (here)"/>
        </body>
    
        <script type="text/javascript">
                window.onkeypress = window.onkeyup = window.onkeydown = function( event ) {
                    event.preventDefault();
                    return false;
                };
                document.getElementById( "clickDiv" ).onclick = function( event ) { 
                     console.log( "you clicked me and the window events related to the keyboard are still being prevented ;)" );
                };
                document.getElementById( "typeInput" ).onkeyup = function( event ) { 
                     console.log( "you typed inside me and the window events related to the keyboard are still being prevented ;)" );
                };
        </script>
    
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some websites that have been attacked and infected with malware. There are
I am currently designing a focused webcrawler. I have it tested with some websites
Is there a twitter API that returns mood? I have seen some websites that
I have seen some demos about the jQuery wizard plugin on websites. But all
I have an example of some code that I see often in websites that
I have this website http://wedessertmore.com that has some forms popup when you click on
I am always working with some big websites that is annoying to upload given
Some websites have forms with input type=text. And inside these textboxes there is a
I have a C# Solution that includes several websites. Those websites have some communal
I have seen some websites load static data on a page first, and in

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.