Last modified: 2012-07-20 17:14:28 UTC
http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/ With this technique, we could output something like: background-image: url(data:image/png;base64,iVBORw .... ); // For normal browsers background-image: url(mhtml:http://example.com/w/load.php?modules=blah&only=mhtmlimages!foo) !ie; // For IE. Can also use star hack as suggested in the article Where load.php?modules=blah&only=mhtmlimages would output something like: /* Content-Type: multipart/related; boundary="_RLFTW" --_RLFTW Content-Location:foo Content-Transfer-Encoding:base64 iVBORw... --_RLFTW Content-Location:bar Content-Transfer-Encoding:base64 R0lGOD... */ There seem to be some issues with this on Vista, but we'll cross that bridge when we come to it. For now this is a nice-to-have for ResourceLoader 2.0.
What is the advantage of this over linking to the file directly? If it is going to be an http request anyway
(In reply to comment #1) > What is the advantage of this over linking to the file directly? If it is going > to be an http request anyway
Per it being an http request still, and requiring non-standard hacks and only for IE7 below. I think we can just stick to the current fallback, which is to load them from the url directly instead of embedding it.