Advertisement

08.04.2008 at 05:42PM PDT, ID: 23620842 | Points: 500
[x]
Attachment Details

AJAX/Jquery Causing Browser Overload

Asked by MDauphinais1 in JavaScript, Asynchronous Javascript and XML (AJAX)

I'm using the following AJAX/JQuery code to load and refresh a page every 60 seconds while the website is open. A problem I am noticing is that if you let the site sit on a page long enough, the site slows way down and the memory resources for the process iexplorer.exe goes up and up. I am guessing it is being caused by this code and the fact that I am refreshing every 60 seconds. It's almost like each refresh is building up ontop of the last ultimately causing a browser overload. Do you see anything wrong with the code that could cause this?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
function stationdata() {
$("#nowplaying").load("../../currentsong.php?username="+username+"&userid="+userid+"&"+ Math.random() * 999999);
if (actionname=='home') {
$("#listeners").load("../../listenercount.php?"+ Math.random() * 999999);
}
setTimeout("stationdata()", 30000); 
}
 
 
[+][-]08.05.2008 at 08:26AM PDT, ID: 22161861

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.05.2008 at 08:03PM PDT, ID: 22166848

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.06.2008 at 08:33AM PDT, ID: 22171370

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.06.2008 at 09:12AM PDT, ID: 22171930

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.06.2008 at 05:52PM PDT, ID: 22176619

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.06.2008 at 07:51PM PDT, ID: 22177035

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628