I have the code below on the social networking site, it uploads a file that shows users new notifications, if they exist.
The problem is that for some time I leave the page open, it eventually consumes too much memory on my PC and starts to make firefox not respond and gives an error message indicating that the memory is getting low and asks if should I abort the script or something in that direction.
Is there a way to do what I have, but not use so much memory in time?
<script type='text/javascript'> $(document).ready(function(){ var updatenotification = function(){ $('#notificationcontainer') .load('http://localhost/member/beta_new/notifications.inc.php') .fadeIn("slow"); }; var auto_refresh = setInterval(function(){updatenotification();}, 60000); updatenotification(); }); </script>
. , ish dom. , json, , , div, , , . , , .
, , . html-, . script , .
, firebug . , ajax/js, StackOverflow, Netvibes. ( !) firebug,
Source: https://habr.com/ru/post/1713404/More articles:Is there an easy way to add (#) to a file name when a duplicate file name is found? - c #Quality Guide for automake + autoconf and other subtleties of the build process? - perlGit or Subversion for TFS user - gitA recursive non-linear, unsorted tree search using C # lambas - c #Возвращение массива PHP из PHP SoapServer - soapUse jQuery to find out how many list items are in an unordered list. - jqueryMVCContrib grid and send back using model binder - asp.net-mvcAutomatically updating header comments in C ++ - c ++Как приложение для загрузки фотографий Facebook может получить доступ к локальному жесткому диску? - client-sidemqueue.h not found - cAll Articles