• Resolved James Maiden

    (@reallygreenjames)


    Hi there,

    Report number: WYTWZKCI

    I noticed that webp images are missing from my webpages when viewed on an older version of Safari. Other image types are appearing fine.

    I have selected the option to use webp and that’s great for the most part.

    I see my htaccess has some rewrite rules that are intended to cater for older Safari versions. Does this look correct to you?

    marker WEBP start

    RewriteCond %{HTTP_ACCEPT} “image/webp”
    RewriteRule .* – [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
    RewriteCond %{HTTP_USER_AGENT} iPhone.Version/(\d{2}).Safari
    RewriteCond %1 >13
    RewriteRule .* – [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]

    marker WEBP end

    I’m not too hot on such rewrites but is the formatting a bit off for the designation of Safari version?

    Or is there some other reason why webps are being served when they should not be.

    I have also noticed this problem on a different website of mine, so it doesn’t appear to be site specific.

    Thanks for looking!

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • I’m not too hot on such rewrites but is the formatting a bit off for the designation of Safari version?

    No, there is currently no better solution. Unfortunately, Apple doesn’t bother to define the Accept header so precisely that you can get reliable information from it as to whether webp builders are supported. The only clue there is is the version number. In addition, the detection must be designed in such a way that the cache varies can be defined in the .htaaccess. Otherwise one could not offer different image types at all.

    Thread Starter James Maiden

    (@reallygreenjames)

    Thanks for the quick response.

    So just to confirm then, if we use wep replacement, we run the risk that images won’t display in Safari?

    we run the risk that images won’t display in Safari?

    No, why? The detection works. At least, as far as I know, someone has complained about it.

    Plugin Support qtwrk

    (@qtwrk)

    may I know what device , device OS version and Safari version ?

    Thread Starter James Maiden

    (@reallygreenjames)

    Thanks for picking this up.

    The device is MacBook Pro 13″ 2017 running 10.13.6 High Sierra with Safari 13.1.2

    So it’s a device that is not webp capable, but one where we would expect the fallback to be working and not served webp images.

    @reallygreenjames

    I think it would be even more helpful if you posted the full user-agent, because that’s where the information about what type of images will be served.

    Thread Starter James Maiden

    (@reallygreenjames)

    Sorry, what do you mean by “full user-agent”?

    It’s difficult and takes time to get information as the device belongs to a remote third party, but I will see what I can gather.

    I can confirm that I have evidence that webp images have been served to that device.

    • This reply was modified 2 years, 1 month ago by James Maiden.

    Just request this link with the device you have posted above and post the User-Agent that this linked page detects.

    https://www.whatismyip.com/user-agent/

    Thread Starter James Maiden

    (@reallygreenjames)

    Thanks for the link. Here is the info:

    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15?

    Plugin Support qtwrk

    (@qtwrk)

    I don’t see any possible reason why it would serve webp to safari , it’s not coded that way , please try grab some debug log on safari request

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Webp being served to old Safari version’ is closed to new replies.