I am working on a memory leak issue in the Internet explorer. This is a single paged application that is displayed on a large screen and refreshed every thirty minutes using javascript window.location.reload();
. After every refresh the memory size keeps on increasing. I suspect cross page leak in the application.
More about it here.
https://github.com/webcomponents/webcomponentsjs/issues/541 https://msdn.microsoft.com/en-us/library/bb250448(v=vs.85).aspx Javascript memory leak on page refresh; remedy?
But what I noticed was when I changed the code to window.location.reload(true);
i.e hard refresh memory usage is normal and there is no memory leak.
Now my question is when I am using window.location.reload()
is it that other than using the cached javascript, Internet explorer also keeps the leaked javascript objects from the previous page in the Internet explorer memory while when I am using window.location.reload(true)
it not only gets fresh copies of the javascript files but clears any leaked objects held in the Internet explorer memory from the previous page. In short does hard refresh of a page affect the leaked objects held in Internet explorer memory related to that page.