This is the code which updates my updatepanel regularly, it runs very well on local for a long period of time but after being published, it works good for 15-20 minutes , may be lesser sometimes. but after that it does not update the contents inside updatepanel automatically, but on a button click it updates the updatepanel with new data. I suggest it might be the case of outputcache. What is the problem?
<script type="text/javascript" language="javascript">
setInterval(function () {
__doPostBack('updateComments', '');
// document.getElementById("btnExitChatRoom").click();
}, 5000);
</script>
You need to call 'setInterval' on document ready. Below is the example:-