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
{{ message }}
Repository navigation
Generate hash for cachebusting add-on icons instead of relying on modification date #3095
We cachebust add-on icons using the add-on last modification date. This means any modifications to the add-on will force clients to re-download the corresponding icon, even though it has not changed, which sucks for performance.
I implemented that in zamboni a while back and this commit could serve as inspiration: mozilla/zamboni@7983195
URLs for existing icons should behave exactly like before: they should include a modified={number} bit that changes whenever the add-on is modified
URLs for new icons should include a modified={hash} bit that does not change when the add-on is modified. It should only change when the icon itself is updated.
Activity
diox commentedon May 27, 2016
Technically not an API-only thing, though it would affect it. Removing API label.
diox commentedon Feb 21, 2018
QA:
modified={number}bit that changes whenever the add-on is modifiedmodified={hash}bit that does not change when the add-on is modified. It should only change when the icon itself is updated.AlexandraMoga commentedon Feb 23, 2018
Verified as fixed on AMO-dev, FF58 Win10x64
1st scenario:
icon URL before add-on updates
https://addons-dev-cdn.allizom.org/user-media/addon_icons/494/494655-64.png?modified=1519375853
icon URL after some updates applied to the add-on
https://addons-dev-cdn.allizom.org/user-media/addon_icons/494/494655-64.png?modified=1519376426
2nd scenario:
new icon URL (stays the same when add-on details are updated)
https://addons-dev-cdn.allizom.org/user-media/addon_icons/495/495305-64.png?modified=8e891591
new icon URL updated when add-on icon is changed
https://addons-dev-cdn.allizom.org/user-media/addon_icons/495/495305-64.png?modified=85241cf2