Hi all,

I'm using AJAX to reload a div within my script. However it frequently causes the browser to crash. It's happened on two different local environments and I've only been able to test using chrome. Chrome presents this screen: http://i.imgur.com/wq2v7SJ.png

The code used to reload the div is:

<script type="text/javascript">

jQuery(document).ready(function() {
           reloadResponses();

});

function reloadResponses() {
            $('#responses').load('loadcomments.php?id=<?php echo $id;?>&creatorid=<?php echo $topicInfo['id']; ?>');                    
        }

setInterval(reloadResponses, 4000);
</script>

Does anyone know how to resolve this issue?

Just an update - a friend believes this could be down to not releasing resources such as system memory causing it to build up and then crash the browser tab. But chrome seems to be a a steady 138MB - does this sound likely?

Apart from reloading the file containing the code - is there anything else I should be doing/releasing/closing etc?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.