Danny proposes a possible £5 App discussion

Danny (of HoboInternet) has just posted about a idea he’s proposing for the intriguingly-named stripme.org [no site yet] service.

The idea is simple – a RESTful site which can strip comments out of CSS, so you don’t have to serve comment-heavy CSS in day-to-day operations but you can preserve comments for development.

Perhaps the idea can be extended to auto-compress CSS and JavaScript files in a service which takes care of caching? At ShowMeDo we still use raw CSS and JavaScript (it gets piped as gzip-compressed, but the original files are heavy on spaces and formatting) because it is a faff to remember to strip/compress the files for release.

Would a handy service which does this easily (free for low volume, low-cost if you go over a sensible limit?) make for a nice app?

Danny – this sounds like an ideal talking point for the next £5 App!

4 Comments

  • Then I shall talk about it :)
  • The point about using this to compress CSS and JS files is a good one. However, CSS compressors have differing success rates and can cause display problems. There is a review here of some CSS compression tools
  • I've just done some checking on ShowMeDo - our css and javascript files could each be compressed by 10-20%, but since we already use gzip on Apache this won't really matter. Ho hum, I shall have to learn about db optimisations, that's our main bottleneck! Danny I'd still definitely encourage the discussion, it is bound to be useful to some people. Kicking up interesting ideas (which could lead to other ideas) is the whole point of our post-talk discussions.
  • I guess it also depends on how you compress your CSS. Some of those compressors Clive lists look like they try to remove redundant declarations and combine other where possible. I guess that may be what causes some of the to have problems... A straight forward stripping of comments and redundant white-space would be pretty easy and (hopefully) side-effect free. Though if you the CSS was in effect being served up from a different host/URL any "url()" declarations in the CSS would need to be altered to be absolute. e.g.: background: url(background.gif) Would need to become: background: url(https://ianozsvald.com/background.gif) As otherwise the browser would be looking at http://stripme.org/https://ianozsvald.com/background.gif Of course though, you could then allow people to use stripme as a general purpose CSS and associated images hosting service - a bit like FeedBurner for CSS. That would be one way to offload serving files to another server and lighten the load...