Replies: 1 comment 2 replies
-
Hi @mcha-dev. You are correct that Firefox does not support Service Workers in private mode (unlike Chrome and Safari, which do). See https://bugzilla.mozilla.org/show_bug.cgi?id=1320796 for the bug on Firefox, and google/playground-elements#78 to track adding a nicer warning to the Playground for when this happens. The reason we use Service Workers is because it is key to the implementation of https://github.com/google/playground-elements, which is the library that powers the lit.dev playground. Service Workers allow us to host a virtual file server that serves the files as you edit them, hosted entirely within the browser, so that there is no traditional backend server needed. This is great for performance (since there is no network overhead) and privacy (since nothing you type goes to a remote server). |
Beta Was this translation helpful? Give feedback.
-
Hello,
Using Firefox (private mode), I was checking out https://lit.dev/playground/ and they playground was in infinite loading state
Then I checked MDN's Navigator.serviceWorker, and it states:
"The Navigator.serviceWorker read-only property returns the ServiceWorkerContainer object ...The feature may not be available in private mode."
I'm curious to why using the Container here? any benefits vs. using navigator.servieWorker? workaround for such scenario (user in private mode)?
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions