Skip to content

[Firestore] Registering an unload listener and best practices #4236

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

Closed
dbstratta opened this issue Dec 23, 2020 · 4 comments · Fixed by #4886
Closed

[Firestore] Registering an unload listener and best practices #4236

dbstratta opened this issue Dec 23, 2020 · 4 comments · Fixed by #4886
Assignees

Comments

@dbstratta
Copy link

Describe your environment

  • Operating System version: Ubuntu 20.10
  • Browser version: Chrome 87.0.4280.88 (Official Build) (64-bit)
  • Firebase SDK version: 8.2.1
  • Firebase Product: firestore

Describe the problem

Lighthouse 6.4.0 on Chrome 87 warns that the firebase SDK registers an unload event listener and it can prevent browser optimizations like the Back-Forward Cache.

Screenshot from 2020-12-23 20-19-52

Steps to reproduce:

Enable the firestore local persistance.

Relevant Code:

import firebase from 'firebase/app';
import 'firebase/firestore';

firebase.firestore();
firebase.firestore().enablePersistence({ synchronizeTabs: true }); // Happens with `synchronizeTabs: false` too.
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@wu-hui wu-hui self-assigned this Dec 24, 2020
@wu-hui
Copy link
Contributor

wu-hui commented Dec 24, 2020

Thanks for the report! I believe this is something we should address, I can provide an update after the holidays, in the meantime, I'll keep the issue open.

@johanchouquet
Copy link

Hi @wu-hui,

I have the same issue. It brings our score in lighthouse to be not as high as it could be.

Did you plan to address that point in the end ?

@wu-hui
Copy link
Contributor

wu-hui commented May 10, 2021

Apologies for the long delay, this should be addressed in future releases.

@firebase firebase locked and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants