HACKER Q&A
📣 escot

Why do some sites take a long time to *close


We measure load time, but how about close time? Sites like cnn.com and other content/ad heavy sites often take a long time to close (eg close tab). Presumably because they do some scripting during a beforeunload event or something like that. Is there a way to measure this and reprimand sites that do it?

To test this try:

- open https://www.allrecipes.com/

- to make it even more pronounced, open 4 or 5 tabs of recipes.com

- let it load

- close tab

- if you had multiple open you will see that you can't even quickly close them all because the first close will freeze the browser


  👤 throw03172019 Accepted Answer ✓
They might be pinging ad networks upon close of the page? The browser will let some of these requests finish within a certain amount of time.