Повторное использование кэшированного приложения без размывания ответов на запросы
DEV · 12.11.2026 · 23:25
Кэшированное приложение может не загружаться в оффлайн-режиме из-за добавления параметров запроса. Рекомендуется использовать маршрутизируемый подход для обработки таких запросов.
Оригинал
Reuse a Cached App Shell Without Blurring Query-Driven Responses
A cached app shell may fail to load offline when a navigation adds a tracking or cosmetic query parameter. A request for /app and one for /app?utm_source=newsletter are different URLs under default cache matching, even when both should receive the same shell document. The safe fix is route-scoped rather than global. First classify the request: allow only GET requests for a canonical shell path such as /app. For that one lane, use a cache lookup that ignores the URL search component. The cached