Good code, Pankash1989, thanks.
Another option is to disable cache (if you need to load fresh data, like XML feed):

var auto_refresh = setInterval(
function()
{
$.ajaxSetup({ cache: false });...