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

Crisp uses the mediadevices API which busts the Chrome bfcache #17

Open
mayrsascha opened this issue May 15, 2023 · 5 comments
Open

Crisp uses the mediadevices API which busts the Chrome bfcache #17

mayrsascha opened this issue May 15, 2023 · 5 comments

Comments

@mayrsascha
Copy link

Hi Crisp Team,

I'm using the Crisp widget on a couple of my websites. I recently ran a Google Lighthouse check on one of them, and on all pages, I got the same issue:

image

If I understand correctly, DevTools is referring to this API.

By using the "Search" tool of Chrome Devtools I found that apparently only the Crisp chat widget is utilizing that API.

Please have a look, as this could potentially seriously impact cache performance for every page using your widget.

@baptistejamin
Copy link
Member

baptistejamin commented May 15, 2023 via email

@mayrsascha
Copy link
Author

@baptistejamin Thank you for your quick reply. Are you sure that it doesn't impact the performance? Lighthouse specifically mentions that the bfcache (cached pages when the user goes back and forward with browser buttons) is found to be disabled through the presence of this API in the code and it wasn't even testing calls or audio messages with Crisp, just the simple page load Lighthouse test.

@baptistejamin
Copy link
Member

baptistejamin commented May 15, 2023 via email

@mayrsascha
Copy link
Author

@baptistejamin I did some further research and actually this can be tested also directly without Lighthouse, there is a special tool in dev tools that navigates back to chrome://terms and forward and specifically checks if the bfcache is being used.

I tried it on my page and it shows that it's not being used:

image

@anshuman-aaa
Copy link

Hi @baptistejamin ,

Any updates on addressing this issue? We're currently working on enabling bfcache on our website, and it appears that the Media API is causing some compatibility issues. We noticed that when we removed Crisp Chat from one of our temporary instances for verification, bfcache started working as expected.

Thanks for your assistance.

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