jamesgpearce / confess

[ARCHIVED] Uses PhantomJS to headlessly analyze web pages and generate manifests. You may be able to use the puppeteer-har package instead.
874 stars 101 forks source link

ressources defined in CSS file are not included as far as i can see. #2

Closed aquam8 closed 12 years ago

aquam8 commented 13 years ago

Hi James,

I've enjoyed playing with confess so far. I'd like to use it indeed to generate our manifest files. It's worked well to find all js, css files and inline images. But it's failed to find any images defined in CSS files in background-images rules. I understand most of the confess.js script but i'm not too familiar with document.styleSheets and co, so i'm not sure what you're looking for.

Could you please test if the resources defined in CSS file are really included in CACHE output?

Code below does not seem to generate anything: foreach (document.styleSheets, function (stylesheet) { foreach (stylesheet.rules, function(rule) { if (!rule['style']) { return; } foreach (properties, function(property) { ... }, this); }, this); }, this);

Thank you / Matt

PS: Charles Proxy (www.charlesproxy.com) is a great tool btw if you want to see what resources are being downloaded.

jamesgpearce commented 12 years ago

Hey Matt, I made the trawling for url-like assets more aggressive in the December release. Could you point me to a test-case URL, or could you give the updated version a try to see if it's resolved?

Thanks for the feedback! JP

aquam8 commented 12 years ago

Yes i have noticed that more assets are picked up in your new release. It's working ok now Thanks!