No Cache-Control
headers on IA CDN requests
#8927
Labels
Lead: @RayBB
Issues overseen by Ray (Onboarding & Documentation Lead) [manages]
Priority: 2
Important, as time permits. [managed]
Theme: Performance
Issues related to UI or Server performance. [managed]
Type: Bug
Something isn't working. [managed]
Milestone
Problem
These two JS load on every page: https://openlibrary.org/cdn/archive.org/donate.js and. https://openlibrary.org/cdn/archive.org/analytics.js
However, they are not cached like the rest of the JS.
This causes a lot (2 seconds) delay when on a very slow connection (only a few 100ms on a decent connection).
Their headers:
Headers for all other requests:
Evidence / Screenshot
Relevant URL(s)
Reproducing the bug
No response
Context
No response
Notes from this Issue's Lead
Proposal & constraints
Add cache control headers.
Probably should also add
defer
orasync
to their script tags so they don't block loading when they're not cached but this could be a different issue.https://javascript.info/script-async-defer
Related files
openlibrary/openlibrary/plugins/openlibrary/code.py
Lines 425 to 430 in 45ed081
openlibrary/openlibrary/templates/site/footer.html
Lines 41 to 42 in 45ed081
openlibrary/openlibrary/plugins/upstream/utils.py
Lines 1468 to 1469 in 45ed081
Stakeholders
PS: I don't have bandwidth to take this right now.
The text was updated successfully, but these errors were encountered: