igrigorik / webp-detect

WebP with Accept negotiation

Home Page:http://www.igvita.com/2013/05/01/deploying-webp-via-accept-content-negotiation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What if the browser does not send proper accept type

i-arindam opened this issue · comments

This ideally should be a comment, but since github doesn't allow comments, filing an issue.

Your nginx config mentions to check if the client accepts webp or not.

Is it 100% sure that browsers send this? I see things like

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

What do the q=0.9 mean?
I don't see an explicit mention of webp

Doesn't the config file check for *.webp in the accept headers (as a string regex)

Or am I missing something?

Chrome will only send "image/webp" accept header for image requests - e.g. a request initiated by an tag.

For information on qualifiers, see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html