You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing an issue where a GET request to a page with any URL parameters (or even just a ? at the end) will go straight to the 404 page (or navigateFallback page) instead of displaying the actual page.
Visiting a page with URL parameters in a new tab works, as does a full reload. But clicking on a link to any page with a URL parameter (or manually appending ? to any route in the URL while the page is open, or submitting a form with method GET) goes straight to the 404 page.
Two questions regarding this behaviour:
According to the documentation on precaching, it should use a CacheFirst strategy but fallback to a network request if it doesn't find a match. Apparently workbox doesn't like to serve precached pages if the URL contains parameters (which, ok, fair enough), but why does it fall back to the 404 page instead of a network request, as the documentation claims it should?
Can I configure workbox to use the precached asset even if there are some URL parameters, so that /path/to/page is used when navigating to /path/to/page? through a link on the site? Edit: Never mind the second question, I found ignoreURLParametersMatching. It's awkward when trying to ignore a single question mark, but I guess that's a workbox issue, opened another issue here: A question mark at the end of a route causes precached route to not match GoogleChrome/workbox#3291
Here's my config (I'm using the Astro integration, but I don't think this is relevant here):
I'm seeing an issue where a GET request to a page with any URL parameters (or even just a
?
at the end) will go straight to the 404 page (ornavigateFallback
page) instead of displaying the actual page.Visiting a page with URL parameters in a new tab works, as does a full reload. But clicking on a link to any page with a URL parameter (or manually appending
?
to any route in the URL while the page is open, or submitting a form with method GET) goes straight to the 404 page.Two questions regarding this behaviour:
Can I configure workbox to use the precached asset even if there are some URL parameters, so that/path/to/page
is used when navigating to/path/to/page?
through a link on the site?Edit: Never mind the second question, I found
ignoreURLParametersMatching
. It's awkward when trying to ignore a single question mark, but I guess that's a workbox issue, opened another issue here: A question mark at the end of a route causes precached route to not match GoogleChrome/workbox#3291Here's my config (I'm using the Astro integration, but I don't think this is relevant here):
The text was updated successfully, but these errors were encountered: