• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 How can you specify a cache validator

#1
Running our site through GTMetrix, we get the following "complaint."

The following resources are missing a cache validator. Resources that do not specify a cache validator cannot be refreshed efficiently. Specify a Last-Modified or ETag header to enable cache validation for the following resources:


https://xxx/forums/data/avatars/s/11/11747.jpg?1483561263
https://xxx/forums/data/avatars/s/15/15471.jpg?1490113793
https://xxx/forums/data/avatars/s/29/29403.jpg?1502229885
https://xxx/forums/data/bdCache/css/1502126374/850d269c8f90459bef33c9dc82372279.css
https://xxx/forums/data/bdCache/css/1502126374/ddd19f7199e9aa49c8d4ad8a34619228.css
https://xxx/forums/data/resource_icons/0/123.jpg?1489471572
https://xxx/forums/data/resource_icons/0/272.jpg?1499105255
https://xxx/forums/data/resource_icons/0/35.jpg?1487083373
https://xxx/forums/data/xengallery/26/26876-aa80773308732546ca4e32bd09aae523.jpg?1483306600
https://xxx/forums/data/xengallery/27/27311-50ff67d746ebb52d618c89ca47fc779c.jpg?1483306721
https://xxx/forums/js/xenforo/xenforo.js?_v=6954ea0d
https://xxx/forums/js/xengallery/min/media_slider.js?_v=ebfe6bb0
https://xxx/forums/styles/default/xenforo/clear.png
https://xxx/forums/styles/default/xenforo/gradients/category-23px-light.png
https://xxx/forums/styles/default/xenforo/xenforo-ui-sprite.png
https://xxx/forums/styles/default/xengallery/AjaxLoader.gif
https://xxx/forums/styles/mps_default/logo.png
https://xxx/forums/styles/mps_default/node-sprite.png
https://xxx/forums/styles/mps_default/page-bg.jpg


Obviously, a few of these apply to add-ons, including official add-ons like Resources and Xengallery, but I'd like to address any I can. Is there a way to do this? Is it even important?
 

Brogan

XenForo moderator
Staff member
#3
Avatars and other content already have a cache buster string - the time stamp after the ?.

The rest don't need it - they are static content and unlikely to change.

In general, we recommend ignoring the suggestions from these 'optimisation' sites.