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

  • Home
  • SEARCH
  • 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 8975861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:59:11+00:00 2026-06-15T18:59:11+00:00

I am seeing a major memory leak within Firefox and IE on my below

  • 0

I am seeing a major memory leak within Firefox and IE on my below code. To be fair, it could very well be my poor implementation and it needs changing, to allow Firefox and other browsers to garbage collect.

Does anyone have any suggestions on how to tweak the code to allow for a more efficient way of refreshing the page?

<input type="checkbox" onclick="sel1()" id="AutoRefresh">

<script type="text/javascript">
    function sel1(){
        var ref = document.getElementById('AutoRefresh').checked;
        if(ref == true) {
            setInterval(function(){
                document.getElementById('dataRefreshButton').click(); }, 2000);
            }
            window.alert("Auto refresh on");
        }
</script>
  • 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-15T18:59:12+00:00Added an answer on June 15, 2026 at 6:59 pm

    I think this will be better.

    <script type="text/javascript">
        function getdata(){
            // get your data    
        }
        var intGetData;
        function sel1(){
            var ref = document.getElementById('AutoRefresh').checked;
            if(ref == true) {
                intGetData = setInterval(getdata, 2000);
                window.alert("Auto refresh on");
            }
            else{
                clearInterval(intGetData);  
                window.alert("Auto refresh off");           
            }
        }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I suspect we have a major memory leak in our ActiveMQ connection bridge -
I'm seeing my Ambient Data Framework code is entered on every http request, so
I remember seeing this functionnality while editing elisp code, using a config cloned from
anybody seeing a problem in this code....firebug is telling me ) is missing $('#addschool').dialog({
Seeing this: http://www.suckless.org/wiki.html . A wiki based on Mercurial. Are there any other non-code
Seeking help to design a layout as shown here: http://docs.google.com/Doc?docid=0AQhgDtGvE2HgZGZ6cmtua185MTd0eGdyZmc&hl=en The major challenge I
Seeing various locking related question and (almost) always finding the 'loop because of spurious
Seeing lots of SOAP/RDS stuff, but just want to dump some MySQL data and/or
Seeing some strange things; help is being solicited. I have a query, like so:
Seeing as you can convert any document to a byte array and save it

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.