3 ms·
A few years ago I wrote a python script which does this and more. It inlines the CSS to the page and reduces it to only the used CSS rules [1]. Additionally,
by jaytaylor 14y ago
A few years ago I wrote a python script which does this and more. It inlines the CSS to the page and reduces it to only the used CSS rules [1].
Additionally, my version can also inline the page images as base-64 encoded blocks.
Cheers!
[1] https://github.com/jaytaylor/python-inlineify-html https://github.com/jaytaylor/python-inlineify-html
- peterbe 14y agoThat looks awesome! Had I known about this I might not have built mincss. Now, I can see other benefits with mincss plus it was fun writing it. Check this out for a use case where I apply mincss and gain a massive performance boost: http://www.peterbe.com/plog/mincss-in-action http://www.peterbe.com/plog/mincss-in-action
- peterbe 14y agoBTW, I like your wget.py. Did you write that? I suspect I've seen it before.
- jaytaylor 14y agoThanks! I did write it, and I think I've also seen somebody else's "wget.py" in some other python project before, though I can't recall where. At any rate, I've found it an extremely useful tool in a multitude of different contexts. Here is a link to my latest version of it: https://gist.github.com/4596861 https://gist.github.com/4596861 At this point it has become less simple and more versatile. Enjoy! -Jay