Use Cache-Control: immutable on images

Bug #1739671 reported by François Marier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Libravatar (obsolete)
Invalid
Wishlist
François Marier

Bug Description

Since no browser currently supports "stale-white-revalidate" (added in bug 1406843), we should switch to using "immutable":

  https://hacks.mozilla.org/2017/01/using-immutable-caching-to-speed-up-the-web/
  https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#Revalidation_and_reloading

Not only will it speed up load time when the image is cached, but it will also reducing server bandwidth, by eliminating 304 responses, when reloading pages or displaying the save images again.

Tags: cache
Revision history for this message
François Marier (fmarier) wrote :

Actually, I misunderstood how "immutable". This is for versioned URLs only. The resources that are cached as "immutable" will NEVER expire.

If we used this to serve avatars, it would prevent users from being able to change their avatars.

Changed in libravatar:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.