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

Fixed Make all Media Gallery thumbnails cacheable in browsers (static URLs of thumbnails)

#1
When a visitor opens a page containing media gallery thumbnails (latest items at forum home or previews of media items at gallery home) browser reloads some media gallery thumbnails on that page, even if it already had loaded them earlier. This increases overall page load time and creates additional load on server.

I guess this is because some thumbnail URLs are dynamic (have ?t= changing parameter).

For example, on the first page load a particular thumbnail image source is:
http://www.site.com/data/xengallery/youtube/youtube_xxxxxxxxxx_thumb.jpg?t=1427811341

then on the second visit, same thumbnail image source is:
http://www.site.com/data/xengallery/youtube/youtube_xxxxxxxxxx_thumb.jpg?t=5437611743

So, it's impossible to leverage caching of all thumbnails images via .htaccess.

Can we have static URLs of all thumbnail images, so it would be possible to force browser level caching via .htaccess file?

This problem exists at least with thumbnails of YouTube videos (not all images in gallery).

Media gallery version 1.03.
 
Last edited:

Mike

XenForo developer
Staff member
#2
This appears to be specific to videos. Other images do have a cache buster that doesn't change (when unnecessary).

I've moved this into bugs to examine if there's a reason we do this for videos specifically.