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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:25:49+00:00 2026-06-06T12:25:49+00:00

OK this is an odd error, as it’s the first ajax page without any

  • 0

OK this is an odd error, as it’s the first ajax page without any complete reloads I’m creating it’s an error I never had to face before… and even the Internet doesn’t help me – as it doesn’t seem to be an usual problem.

Let’s get to the Problem step by step:
I have a page where the Ajax request is triggered by a function which simplified looks like this:

$("a[rel='tab']").live('click',function(e) {

pageurl = $(this).attr('href');
$.ajax({url:pageurl+'?rel=tab',success: function(data){
  $('#content').html(data);
}});
if(pageurl!=window.location){
  window.history.pushState({path:pageurl},'',pageurl);
}
e.preventDefault();
return false;
});

This is parsed by the PHP File and if the property is set the design won’t be loaded but instead just the file itself gets loaded – easy hu?

OK, now the problem itself – it was obvious that the page became slower with the time but I didn’t really bother at first as I thought it was some mistake in the designs javascripts – but it wasn’t.

So I took a look at the firebug and what I’ve seen explained a lot -> The Requests stack up with every new page! Of course that would lead into an overkill… Well at first I thought it were just the “setInterval”‘s and got a workaround running which resets them on each reload.

But that wasn’t the only case they also seem to stack up in “scripts” as I don’t think that’s a plain history as just the reloaded scripts show up more than once!

Any hints in the right would be really helpfull as I am pretty much stuck here!

  • 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-06T12:25:52+00:00Added an answer on June 6, 2026 at 12:25 pm

    OK as it seems the issue is just related to the setInterval after all – After trying around for a while I came to the conclusion that this was the main problem, and it was just some kind of a loop in firebug itself.

    However maybe someone gets stuck on the same issue so the solution is pretty much this way:
    You have to:
    1. Create an array where to store your Intervals
    2. call your setIntervals this way
    3. Reset them on each “new window”

    var intervalArr = new Array();
    
    function killIntervals(){
    while(intervalArr.length > 0)
        clearInterval(intervalArr.pop());
    };
    

    These are the array and the function

    So these should be added in your AJAX Request function:

    killIntervals();
    intervalArr.push(setInterval (yourintervalfunction, 5000));
    

    I hope this will come in handy for someone.

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

Sidebar

Related Questions

Im getting this odd error: Any help would be great? This is the error:
I have odd problem: After starting server I got this error: undefined local variable
I got this odd error and I can't figure out where it came from:
I'm getting this odd error in the preg_match() function: Warning: preg_match(): Compilation failed: range
Has anyone ever seen this odd error when attempting to load an applet? I
My app continues to crash on startup with this odd error: -[UIApplication _preferredInterfaceOrientationGivenCurrentOrientation:]: unrecognized
I am having an odd error in my shell script. using this: $find /sys/class/
I am having this odd error with my code. I am trying to troubleshoot
I'm trying to (cross-)compile node.js and I get this odd error that appears to
Anyone have any insight as to what this error is, and how to fix/avoid

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.