Jump to content

Safari do not send image/webp in accept headers


hebrerillo

Recommended Posts

I developed a server side script to check if the browser supports webp format images by checking the "image/webp" string in the accept request headers. The problem is that recent versions of Safari, even though they support Webp, they do not send the string "image/webp" in the headers. Why?? How can I check if the Safari browser supports webp??

Screenshot 2023-11-15 at 12.16.10.png

Link to comment
Share on other sites

@requinix thank you so much for your answer!

I know a client-side solution like this one, but that would mean blocking JavaScript which will delay the page rendering.

I want to serve WEBP images to Safari if supported. Maybe I could detect in PHP if the request was performed using Safari and its version to serve Webp images.

Thank you anyway 🙂

Edited by hebrerillo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.