Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable page unload beacon #347

Open
iwindfree opened this issue Apr 3, 2023 · 2 comments
Open

disable page unload beacon #347

iwindfree opened this issue Apr 3, 2023 · 2 comments

Comments

@iwindfree
Copy link

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.

@mems
Copy link

mems commented Jun 12, 2023

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 the pagehide event. The pagehide event fires in all cases where the unload event currently fires, and it also fires when a page is put in the bfcache.

Back/forward cache

@bluesmoon
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants