Tab Forever Loading

If you find the loading spinner in browser tab spinning forever, it might be due to the use of document.write().

Because document.write is not just a standalone method, but part of a trio:;
document.write("Well written");

And if close() is not called at the end, the spinner will forever spin on.

To quote MDN’s docs: Writing to a document that has already loaded without calling will automatically call Once you have finished writing, it is recommended to call document.close() to tell the browser to finish loading the page.

Read more here.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.