3 ms·
This Image Is Also an HTML Webpage
- leepowers 10y agoThe interesting thing here is the browser renders content of "text/html" as an image when included as the src of an <img> tag. There's some extra sniffing going on by the browser to suss out what type of file is being delivered. The idea, I guess, is that in the wild servers don't always return the correct content type. Such as a PHP script that outputs a dynamically generated graphic, but a developer neglects to set the content type.
- sigvef 10y agoYou can even cleverly use the image data as a free compressed binary data store, useful for e.g. reducing file size of single-file demos: http://demoseen.com/blog/2011-08-31_Superpacking_JS_Demos.html http://demoseen.com/blog/2011-08-31_Superpacking_JS_Demos.ht...