CSSrefresh - Automatically Refresh CSS files
cssrefresh.frebsite.nl
cssrefresh.frebsite.nl
I'm wondering if there's something that refreshes the browser when you make changes to the CSS files _before_ saving? Like CSSEdit (which I've used religiously for the past 2 years), but applies to all sort of files (HTML/HAML, SASS/SCSS/LESS).
I do agree that rolling CSSEdt into Espresso isn't the same. I don't know why but I liked CSSEdit better when it was a standalone app. Anyway, as an alternative to CSSEdit or the other desktop apps that give you the instant refresh, you could always write a shell script that watches your working directory and executes the LESS (or SASS/SCSS) compiler then refreshes your browser. I actually used that once but lost it while formatting the laptop it was on. The part that watches the folder and executes the compiler is easy but I had someone else help me with the browser refreshing part.
[1]: http://livejs.com/
The actual script on the site is unminified and quite easy to grasp: Since it's only a client-side solution it has to resort to polling every stylesheet every second(!) and check the file's Last-Modified header from the ajax request.
This is hardly an optimal solution, since you end up making a lot of requests even though no changes are being made. In addition to the performance standpoint, you end up cluttering any ajax monitoring views (e.g. Chrome dev tools).
LiveReload (http://livereload.com/) seems to be a good alternative (Mac only). Any suggestions for similar solutions for other OSes?
EDIT: Just tried the experimental v0.0.2 Windows release of LiveReload. Installation was really easy, and I got it working with the Firefox extension right away. More info: http://help.livereload.com/kb/roadmap/latest-development-bui...
javascript:(function(){var%20s,i,x;x=document.getElementsByTagName('link');for(i=0;i<x.length;i++){x[i].href=x[i].href+'?'+new%20Date().getTime();}})();
It does similar thing but with less AJAX requests. Works only with Django though.
And then:
"With CSSrefresh installed, all the included stylesheets are automatically refreshed directly after you save them."
So you still have to switch between your browser and your editor, right?
As mentioned in other comments, LiveReload does this for CSS or SASS (Mac only, unfortunately).