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();
page.open(phantom.args[0], function () {
  console.log(page.content);
  phantom.exit();
});

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.

ëRiC - 04 February 2013 [«« Reply to this]
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:
http://www.csstrashman.com

dunno if thats news to you.
ëRiC
Peter Bengtsson - 04 February 2013 [«« Reply to this]
Looks promising, but...
http://cl.ly/MfAk
ëRiC - 11 February 2013 [«« Reply to this]
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