4 ms·
The images are of type .webp which may fail to load in Safari (at least for me), maybe have them in a more accessible format?
by CheckBlanket 7y ago
The images are of type .webp which may fail to load in Safari (at least for me), maybe have them in a more accessible format?
- edent 7y agoMy server is designed to serve webp only to devices which accept them. So Safari should show jpg / png. Obviously, if you load the image directly, it'll still be webp.
- scrollaway 7y agoHow do you do it? Looking at the code, it doesn't seem to be based on the Accept headers or on figure/imageset tricks. UA sniffing?
- edent 7y agoI'm using LiteSpeed Cache Management plugin for WordPress. It has fiddled my .htaccess to RewriteCond %{HTTP_ACCEPT} "image/webp" [or] RewriteCond %{HTTP_USER_AGENT} "Page Speed" RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp] But... now I think about it, I probably still have CloudFlare cacheing on. Which means that won't get hit some of the time. Hmmmm.... Let's see if my server can survive HN without a CDN.
- nitrogen 7y agoYou should be able to send a Vary: Accept header to the cache to have it cache all image types.
- judge2020 7y agoIf CF is caching, this won't work. https://support.cloudflare.com/hc/en-us/articles/217343117-What-headers-can-I-vary-the-cache-on- https://support.cloudflare.com/hc/en-us/articles/217343117-W...
- joshu 7y agofails on mobile safari too