1
8
Fork
You've already forked nup
0

HTTP responses to App Engine admin users aren't cacheable #1

Open
opened 2021年02月08日 13:21:12 +01:00 by derat · 2 comments
derat commented 2021年02月08日 13:21:12 +01:00 (Migrated from github.com)
Copy link

App Engine annoyingly mangles headers on HTTP responses to admin users to disable caching. It does this intentionally since those responses have X-AppEngine-Resource-Usage and X-AppEngine-Estimated-CPM-US-Dollars headers, but it means that browsers don't cache cover images or MP3s (I think -- Chrome seems to cache media files so aggressively that I wouldn't be surprised if it ignored what the server tells it).

I filed https://issuetracker.google.com/issues/179471500 but I assume I won't even get a reply.

I haven't figured out any workarounds yet. Maybe I could use Cloud Load Balancing to re-add the headers, but that seems like overkill.

App Engine annoyingly mangles headers on HTTP responses to admin users to disable caching. It does this intentionally since those responses have `X-AppEngine-Resource-Usage` and `X-AppEngine-Estimated-CPM-US-Dollars` headers, but it means that browsers don't cache cover images or MP3s (I think -- Chrome seems to cache media files so aggressively that I wouldn't be surprised if it ignored what the server tells it). I filed https://issuetracker.google.com/issues/179471500 but I assume I won't even get a reply. I haven't figured out any workarounds yet. Maybe I could use Cloud Load Balancing to re-add the headers, but that seems like overkill.
derat commented 2021年02月24日 01:01:12 +01:00 (Migrated from github.com)
Copy link

Also posted https://stackoverflow.com/q/66342766/6882947 to see if anyone has found a workaround.

Also posted https://stackoverflow.com/q/66342766/6882947 to see if anyone has found a workaround.
derat commented 2021年10月31日 13:30:57 +01:00 (Migrated from github.com)
Copy link

I looked into the possibility of using a Chrome extension to modify the response headers, but chrome.webRequest.onHeadersReceived doesn't allow the modification of cache-related headers: https://bugs.chromium.org/p/chromium/issues/detail?id=355232

It seems like using a non-admin account is the best option for now.

I looked into the possibility of using a Chrome extension to modify the response headers, but `chrome.webRequest.onHeadersReceived` doesn't allow the modification of cache-related headers: https://bugs.chromium.org/p/chromium/issues/detail?id=355232 It seems like using a non-admin account is the best option for now.
Sign in to join this conversation.
No Branch/Tag specified
main
headless
picture
datastore
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
derat/nup#1
Reference in a new issue
derat/nup
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?