3 ms·
I appreciate the technical trickery in this version, but has it not been possible to do this since at least 1996[1] by having the server serve different files b
by throwawayReply 10y ago
I appreciate the technical trickery in this version, but has it not been possible to do this since at least 1996[1] by having the server serve different files based on the "Accept" http header?
[1] https://www.w3.org/Protocols/HTTP/1.0/spec.html#Accept https://www.w3.org/Protocols/HTTP/1.0/spec.html#Accept
- united893 10y agoGreat, now construct a jpeg image that's valid HTML and a valid uncorrupted picture as well.
- aioprisan 10y agoThat's for the initial resource itself, not subsequent asset requests. For instance, an asset request is a separate request on a different domain, such as one for a customer service analytics tag, which is requested without any accept resource type request filter.
- throwawayReply 10y agoSo if the initial request comes with "Accept: text/html" then you serve a webpage. The request when linked as img comes as "Accept: /" and you serve an image. Perhaps caching or other schemes would break this, I'll try to knock up a PoC.