Lars Pind

coaching and entrepreneurship

Lars Pind - coaching and entrepreneurship

Re-ReCSS

February 13, 2006 · 3 comments

I found this very handy ReCSS bookmarklet by David Schontzler (via planet::dojo), which reloads the stylesheets for a page on the fly, so you don't have to reload the whole page for each change. Especially useful for AJAX page, where you may need to do a little clicking to get to see the styles you are changing.

I had to fix it up a bit to make it work with Rails and Safari. The fixes were:

  • Accept titlecase "Stylesheet" as the value of the rel attribute, which is the Rails default.
  • Use URL encoding for the backslash in \?, because Safari for some reason insisted on converting it to a forward slash.

Click here for the updated version, which you can then drag to your toolbar or save as favorite. (I'm posting it on a separate page because my blog software munges the URL so it doesn't work).

As soon as David updates his version, I'll kill mine and link to his instead, so don't link to the above page.

UPDATE: David has updated his version. Thanks, David.

UPDATE 2: Textile/RedCloth really doesn't like ~'s in URLs, I just realized the original post was messed up. Fixed now.

Technorati Tags: , , ,

blog comments powered by Disqus

3 responses so far ↓

  • 1 chakpak // Nov 13, 2006 at 05:34 PM

    I changed my css. But the browser still get the previous version at the first go. After a refresh it fetches the latest one. How can I make the browser fetch the latest one at the firt go itself ?
  • 2 Lars Pind // Nov 13, 2006 at 11:46 PM

    I have no idea, it doesn't happen for me. Which browser?
  • 3 fedmich // May 02, 2008 at 02:01 PM

    Thanks guys, very helpful indeed :)