[dokuwiki] Re: Data-URI support, worth having?

  • From: Anika Henke <anika@xxxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sun, 10 Jul 2011 11:42:16 +0100

On 17/06/2011 08:07, Michael Haschke wrote:
  * does not work for IE<  8

* add auto creation of patch css, included via conditional comments
* add<IE8 hacks after the datauri definitions

I guess that both option are heavy stuff b/c the the dokuwiki css
parser do not really understand css, cannot distinguishing between the
css rules. can it? so last option:

* document explicitly that feature and note that<IE8 need an extra patch :)

As no-one has specified the extra patch for IE<8 yet, I'll just list all the options for your information.

Serve an extra css file which is only loaded by IE<8 (best via conditional comments). Maybe css.php should be able to create two different versions of itself. And the config option should not be used inside css.php to switch it on and off, but should call css.php with a different parameter and let that parameter switch it on and off.
But there are three options how this extra file could look like:

a. Serve it the old way (single images).
b. Make automatic sprites. (I don't like it, but list it here for completeness' sake.)
c. Serve MHTML.

And then there's obviously the option to not do anything for IE<8. (The icons are not that important after all.)

With MHTML we'd have the same advantages as with datauris (because it basically works the same way), but the disadvantage of two nearly identical files served for different browsers.
A little example which explains the difference:

a.iw_doku { background-image: url(data:image/gif;base64,R0lGODlhEAAQAPMOAKpvR8JMK0umTje1J6rCc7SrnrfHtNvEq8vLy87hzvbqxvv98uze3rattP///wB9ACH5BAEAAA4ALAAAAAAQABAAAARp0MlJq72XHWOKOUkBNFRRKGiSLEVwABSiGE1Dt4FLNQcisznAoXI4oBaHXGFhIBqTgABgsSBRFrIECLFIGBIWhEFAMCC8qyaF83gMBAYqp7Icv99f9aSxYDDGZAMrFWgNMggCVhiLjBcRADs=)}

Content-Type: multipart/related; boundary="CSSEmbed_Image"

a.iw_doku { background-image: url(mhtml:<path-to-file-with-above-declaration>.css!doku.gif)}

DokuWiki mailing list - more info at

Other related posts: