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

Do not reload if tab is *in*active. #160

Closed
israelsucks opened this issue Feb 29, 2024 · 1 comment
Closed

Do not reload if tab is *in*active. #160

israelsucks opened this issue Feb 29, 2024 · 1 comment

Comments

@israelsucks
Copy link

I want my page to be refreshed only while I'm looking at that specific tab.

Tried if discarded and if offline options, but they don't help for my use case. I'm on FF desktop.

@james-fray
Copy link
Owner

Use policy reloading:

document.currentScript.dataset.continue = document.visibilityState === 'visible';

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

No branches or pull requests

2 participants