I am really second guessing the decision to build this in #NextJS.
There's a LOT of confusion around the new #AppRouter paradigm, the Discord is a madhouse.
I've been struggling just to get the #serviceWorker and #webmanifest for the #PWA set up right. It seems most people use `next-pwa` but it hasn't been updated to support AppRouter yet so there's a nasty fix to do. https://github.com/shadowwalker/next-pwa/issues/424
I haven't even attempted #ServerComponents yet.
#servercomponents #pwa #webmanifest #serviceworker #approuter #nextjs
Why is it ALWAYS such a pain in the ass to register a #serviceWorker for a #PWA with a #web #framework. Nobody every considers this use-case when they design these things and we end up with some hacky work around with tons of caveats.
#framework #web #pwa #serviceworker
FYI, I think viewing #Misskey posts directly with #uMatrix will return something went wrong due to I've disable #ServiceWorker by default, better to allow it while browsing...
In Firefox or any forks of that, I think at least partitioned SW are acceptable.
#misskey #umatrix #serviceworker
Hey #browser experts, anyone seen this issue in #Safari? ServiceWorkerRegistrationโs pushManager.permissionState(), Notification.permission, and navigator.permissions.query({name: 'notifications'}) give different answers when in fact the site has already been granted permissions from a previous session. It seems navigator.permissions.query is accurate in my case, though someone here has seen the opposite: https://developer.apple.com/forums/thread/731412
Iโm thinking as a workaround querying all three and taking the most permissive as the source of truth, but ew.
#browser #safari #webdev #serviceworker #pwa #pushnotifications #hacks
Hmm, seems like the 500ing is only when I load the page in an incognito window... it's probably still my #workbox cache in the #serviceWorker, but I'm going to replace the `StaleWhileRevalidate` strategy with `NetworkFirst`. This will mean that the page will have to wait for a network response, but it will maintain my offline support so the #PWA install prompt will still appear. #WebDev
#webdev #pwa #serviceworker #workbox
First I've got to figure out why my static assets are 500ing half the time. It's probably my slapdash #serviceWorker #caching strategy. I like to use #staleWhileRevalidate because it feels like I should just serve from the #cache if I have *something* but I don't feel like prompting the user to reload if there's fresh data. It's probably a bad UX though. I find myself reloading the page several times just to make sure I'm looking at fresh data.
#cache #stalewhilerevalidate #caching #serviceworker
Who still thinks writing a Service Worker for basic features (performance with cache, offline fallback) is cumbersome?
Using #Workbox recipes make it so easy!
Here's the Service Worker for https://pack11ty.dev ๐
https://github.com/nhoizey/pack11ty/blob/main/src/assets/js/service-worker.js
Is it ok to use Workbox's `injectManifest` with the recent recipes `warmCache` option?
I tried this without success in the Service Worker in Pack11ty:
```javascript
staticResourceCache({
warmCache: self.__WB_MANIFEST,
});
```
Other caches are warmed up, not this one.
Efficiently downloading huge files via #JavaScript in the #browser in 2023 still seems the same as in 2013: Open a URL with a Content-Disposition #HTTP header.
#FileSystemAccessAPI is nice but only supported in some #Chromium derivates and presents #UX challenges.
#ServiceWorker hacks ร la StreamSaver.js seem to be the next best thing. But it's not free of compatibility issues either and #DX with all that ceremony is not the best.
So good 'ol Content-Disposition it is.
#javascript #browser #http #filesystemaccessapi #chromium #ux #serviceworker #dx
A different kind of CSS: a Client Side Server. A little experiment to make a Service Worker run a server locally https://romaricpascal.gitlab.io/client-side-server/.
Turns out the browser provides plenty to make that happen, it's great!
#frontend #javascript #serviceworker
Already sick of #chromeโs manifest V3 for extensions. The requirement to have service workers instead of background daemons means I canโt keep my password managerโs data in memory.
What am I supposed to do, decrypt the userโs vault every time the service worker wakes?
Anyone have any better ideas? Iโd prefer to not have to rely on the desktop app for the โliveโ vault data, as having a stand alone extension is valuable as a feature in itself.
#googlechrome #manifestv3 #serviceworkers #serviceworker #browserextensions #browserAddons
#chrome #googlechrome #manifestv3 #serviceworkers #serviceworker #browserextensions #browserAddons
#Chromium #Security severity: High
#vulnerabilities in #Google #Chrome 109.0.5414.119:
#WebTransport
#WebRTC
#ServiceWorker #API
#GuestView
#CVE-2023-0471
#CVE-2023-0472
#CVE-2023-0473
#CVE-2023-0474
#chromium #security #vulnerabilities #google #chrome #WebTransport #webrtc #serviceworker #api #guestview #cve
@tbroyer Thanks for sharing that. I'd heard of the approach but don't think I'd read that article specifically. The performance metrics are very interesting.
I think the difference is that #HTMLFragments routing is technically an #SPA approach and keeps #JavaScript context between routes in a way that a #ServiceWorker navigation would not.
HTML Fragments as a concept is also a little more flexible beyond rendering full pages. It allows you to dynamically render individual components instead of a full page. For example, you can use it to infinite scroll a list, or edit an item of the list and rerender on the server without invalidating the whole page. This is discussed more in the original post:
https://blog.dwac.dev/posts/html-fragments/
For a fully static site with a lot of content, I think the service worker approach could work well, while HTML fragments provides a bit more interactivity.
#htmlfragments #spa #javascript #serviceworker
New blog post: Building a #router with #HTMLFragments.
https://blog.dwac.dev/posts/html-fragments-routing/
This explorers how we can use HTML fragments to define routes, load them dynamically, and then apply them to the main page content. It talks about more complexities with streaming #HTML (because I didn't learn my lesson last time) and even has a bonus section on shipping an application server _inside_ a #ServiceWorker.
Lots of interesting stuff, I hope you check it out!
#router #htmlfragments #html #serviceworker
Wer kennt sich mit #Angular #ServiceWorker aus? Ich wรผrde gerne den verzรถgerten Reload wenn eine neue Version verfรผgbar ist machen wenn der User ohnehin รผber den Router navigiert ... Gute Idee oder nicht?
https://stackoverflow.com/questions/75218426/angular-service-worker-do-hard-reload-on-user-navigation-via-router-if-update #development #webdev
PS: looking for coworkers - https://devjobs.at/team/apollo-ai
#angular #serviceworker #development #webdev
#Idea: I think I've suggested this before, but it would be cool to have a small "server" library using #ServiceWorker APIs.
Would be interesting to wrap such an app in an installer to "bring your own server," maybe in a #WebBundle or #HybridApp.
Probably not much practical use, but could be useful for interactive #SSR demos when you're too cheap to pay for a real server. ๐
#idea #serviceworker #webbundle #hybridapp #ssr
๐ How do you test a service worker, anyway?
by $jeffposnick$hachyderm.io
โ๏ธ https://nicolas-hoizey.com/links/2022/12/04/how-do-you-test-a-service-worker-anyway/
๐ How do you test a service worker, anyway?
by @jeffposnick
โ๏ธ https://nicolas-hoizey.com/links/2022/12/04/how-do-you-test-a-service-worker-anyway/
Did you know that #javascript `bigint` is not serializable when passing from #chrome #extension #serviceworker to the application?
The solution is to transform it as a string and then recreate the Bigint.
#javascript #chrome #extension #serviceworker