summaryrefslogtreecommitdiff
path: root/addons/web_unsplash/controllers
diff options
context:
space:
mode:
authorSamuel Degueldre <sad@odoo.com>2020-03-27 12:50:15 +0000
committerSamuel Degueldre <sad@odoo.com>2020-03-30 11:06:48 +0000
commit02e71a1a3c2ec1446210cddfa0e08840bea7fde6 (patch)
treee6cc9935ff054b15a0dc710223d016a38b668e02 /addons/web_unsplash/controllers
parent49ea7b2b413dfcb2290b02eee4b43bfdabd535b2 (diff)
[IMP] web_editor: add unique to image URLs to leverage browser caching
Previously, image urls did not contain the unique parameter, this resulted in all browser caching for images being dependent on etag headers. This commit changes the url format used by images in the web_editor to use the /id-checksum/ format instead of only the id, this in turn makes it so that the 'Max-age' header is set to 1 year. This also solves some browser caching issues when changing the optimization level of an image in place in the media-dialog. For binary attachments with an url (eg, unsplash images) the unique is added as a search parameter (?unique=checksum) as a cachebuster mechanism, but currently doesn't set the max-age header, which may or may not be done at a later date. task-2091417
Diffstat (limited to 'addons/web_unsplash/controllers')
0 files changed, 0 insertions, 0 deletions