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
The interception appears to happen after ETag header has already been set for the response. Consequently, the ETag doesn't reflect the changed output, which can cause browser caching issues--even if the content is wildly different from one page load to the next, the server is telling the browser, "Nah, nothing changed since the last time you loaded this resource."
It's pretty simple (even if a little inefficient) to regenerate the ETag with another library (e.g., https://www.npmjs.com/package/etag) right before calling send(). But the whole ETag thing a hazard that most users are unlikely to recognize. Would be great to have a built-in option. Or at least a warning in the docs/examples
The text was updated successfully, but these errors were encountered:
We got hit by an ETag issue where every other request would fail to intercept. This was made even more difficult to diagnose because of the Disable Cache checkbox being checked in Chrome DevTools; The problem would go away when DevTools was open.
The issue we were having was that the interceptor would encounter an empty body because of the 304 Not Modified statusCode.
Our solution was to check the status code in the isInterceptable method.
The interception appears to happen after ETag header has already been set for the response. Consequently, the ETag doesn't reflect the changed output, which can cause browser caching issues--even if the content is wildly different from one page load to the next, the server is telling the browser, "Nah, nothing changed since the last time you loaded this resource."
It's pretty simple (even if a little inefficient) to regenerate the ETag with another library (e.g., https://www.npmjs.com/package/etag) right before calling send(). But the whole ETag thing a hazard that most users are unlikely to recognize. Would be great to have a built-in option. Or at least a warning in the docs/examples
The text was updated successfully, but these errors were encountered: