Remember mincss from a couple of days ago? Now it supports downloading the HTML, to analyze, using PhantomJS. That's pretty exciting because PhantomJS actually supports Javascript. It's a headless (a web browser without a graphical user interface) Webkit engine. What mincss does is that invokes a simple script like this:

var page = require('webpage').create();[0], function () {

which will allow any window.onload events to fire which might create more DOM nodes. So, like in this example it'll spit out HTML that contains a <p class="bar"> tag which you otherwise wouldn't get with Python's urllib.urlopen().

The feature was just added (version 0.6.0) and I wouldn't be surprised if there are dragons there because I haven't tried it on a lot of sites. And at the time of writing, I was not able to compile it on my Ubuntu 64bit server so I haven't put it into production yet.

Anyway, with this you can hopefully sprinkle less of those /* no mincss */ comments into you CSS.



He Peter! Nice to see you progressing about this! I really like the idea of having a computed view onto your CSS rather than just the eye :]

after some days of your first post read an article on this already:

dunno if thats news to you.

Peter Bengtsson

Looks promising, but...


AAahhhh haahaaaa ... ehmm *harrump* I actually didn't test it!
But this should be embarassing for them! Your site is far from compicated, isn't it?

Your email will never ever be published.

Related posts