4 ms·
The problem I have with these CSS mini programs is that a 'dynamic' site might not always load the css on each page, unless under certain specific circumstances
by laurencei 14y ago
The problem I have with these CSS mini programs is that a 'dynamic' site might not always load the css on each page, unless under certain specific circumstances.
i.e. what about ajax calls that result in a new div showing?
or a responsive CSS file with media queries depending upon the size of the screen?
- deleted 14y ago[deleted]
- bowmessage 14y agoWhat about a program into which you could feed your pre-processed dynamic documents (php, asp, etc) along with the CSS? I could see myself using that.
- laurencei 14y agoThe problem is there are often too many variables, i.e. what if a username is "blue" for a boy, "red" for a girl (or something like that). And PHP etc is too dynamic. Personally I think the 'best' option is a program which 'records' you using the site, and as a Dev I could use my site for like 30mins, touching each point of key functionality. Then at the end, review what sections of CSS were never used, and pick and choose what to discard based upon that (i.e. I can manually then check for fringe cases I might know of).
- daGrevis 14y agoI see it as: [] You feed in all URLs at once; `urls = ["/", "/sign_up/", "/about/",]` [] It pre-proccesses also JS files and tries to match CSS selectors as well. That would work for jQuery and Zepto! `$("#foo").html($("<span>").addClass("bar"))` Edit: Okay, that won't work for `addClass`! :)
- lukedjn 14y agoWhen dealing with a dynamic site or complete web application I think this would work best when tied into Selenium tests (or a similar integrated test framework).
- flog 14y agoHow about running it as a background to the website, over say, a month, at the end of which you'd have pretty good confidence that you'd have hit all paths.
- EnderMB 14y agoThis is an idea I am currently working on, similar to SitePoint's old "Dust Me Selectors" plugin for Firefox, but running in the background for all selected sites until a set amount of time or the user is happy that they have exhausted all dynamic functionality on the site.
- laurencei 14y agooh cool - i'm very interested in this. Can you please email me? My email is in my profile.
- ganarajpr 14y agoHow about running it as a plugin or something for a suite of functional specs for the website ( if it has one! ). Functional spec's by definition should run all the paths that a user can take, so it should give a pretty good idea of the css that is used.
- peterbe 14y agoYeah, you could have a proxy that saves the whole HTML with its URL for every hit. Then run an analysis after a couple of days and you should get a pretty good idea.