boomerang
boomerang copied to clipboard
disable page unload beacon
Hi, thank's to boomerang script contributors. It's a great script..
I have a two question. one, Is there a way to disable page unload beacon?
two, for web vital score, Does cumulative shift layout (CLS) usually happen before page load event end?
Currently, in order to measure CLS, I set 'afteronload' option of continunity pluin to true and collect cls score from the page unload beacon. If CLS usually happen before page load event end, I will collect CLS from page load beacon not unload beacon.
thanks in advance.
Also note that:
The most important way to optimize for bfcache in all browsers is to never use the
unload
event. Ever![...]
Instead of using the
unload
event, use thepagehide
event. Thepagehide
event fires in all cases where theunload
event currently fires, and it also fires when a page is put in the bfcache.
@mems boomerang doesn't attach to the unload event except for really old browsers that don't have bfcache. The boomerang unload event is the browser's beforeunload or pagehide event.