Hacker News new | past | comments | ask | show | jobs | submit login

I've noticed sometimes that when Cloudflare optimises images and serves up their own WebP versions of your existing images, if you go to save it you get the original jpg/png back.

Presumably the HTTP request that gets sent when you save an image sends different Accept headers.

Doesn't seem to work all the time, but presumably thats down to a combination of different Cloudflare settings, origin server configuration and what format the original image were in too.




My guess is that the HTTP client request, when you do right click "Save Image As", is sent with Cache-Control:no-cache and Pragma:no-cache headers. Which bypasses Cloudflare.


I think it just re-requests without the "Accept: image/webp" in the request header, so you get whatever the server would have sent to a browser that doesn't know about WebP.


That seems like it would have to be an unusual hardcoded path in the browser's code. I can't figure out why it would do that.


Too many complaints that they downloaded a picture from the web that their image viewer can't open maybe?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: