![]() ![]() The key is that everyone deals with caching the same way: by copy-pasting code snippets from the Workbox site or the Google Dev Site and swapping sample values with their own variables. First, how does one build a universal service worker that works with any domains and resources? And second, how does one build a user interface that doesn't have a learning curve for this inherently complicated process? They're abstract and opiniated - and truthfully most developers don't really know about them. And writing Regex is a notorious pain in the ass.ĬORS, preflight requests, opaque responses, cache-control headers… these are some of the concepts that make caching hard to grasp. The order of your rules can lead to unexpected behaviors. Hard-coding lists of URLs in a service worker isn't exactly future-proof. Workbox simplifies things… but isn't quite simple enough yet to my taste. In 2021, most developers use Workbox - a JavaScript library that abstracts the Fetch API and Cache API. As I postulated when they abandoned that plan, making a website work offline consistently is harder than most people think. Earlier this year, Google nearly gave every web app developer an ultimatum: make your app work offline or lose the install functionality.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |