July 2018
Intermediate to advanced
354 pages
8h 51m
English
Utilizing different caching strategies involves some way of triggering specific strategies for different response types or routes. The more complex your application is, the more potential routes and media types you may need to manage.
This can be done by defining an array of rules driven by URL routes. I recommend using regular expressions to match routes, especially when the route has a common base with a large variety options. A good example would be an e-commerce site's product details page. This could be a URL to a pre-rendered page or might involve a QueryString value.
For the PWA tickets application, I am demonstrating how to define a dynamic route for event details using a regular expression ...
Read now
Unlock full access