On Mar 25, 2007, at 11:56 AM, Henrik Nyh wrote:

Nathan Koch wrote:

I've found this topic a few times in the archives, but never came up with a definitive answer.

I'm using Textmate for basic XHTML/CSS/JavaScript editing and while Camino and Safari happily pop right up when I choose "Open Document in Running Browser(s)" and Refresh when I pick "Refresh Running Browser(s)"

but Firefox responds a bit differently.

It doesn't respond at all to "Open Document in Running Browser(s)" and Refresh Running Browser(s)" just opens a new, empty, window or tab.

It's a bit frustrating as Firefox is my browser of choice for working on sites, thanks of course to the Web Development plugin among others.

Any advice?


Firefox isn't very scriptable. The command tries to make it reload in two ways, both of them a bit fragile.


If System Preferences > Universal access > "Enable access for assistive devices" is activated, it switches to Firefox and fakes pressing ⌘R.


If access for assistive devices is not activated, it instead tells Firefox to open "JavaScript:window.location.reload();". That fails if Firefox is configured to open pages in new tabs.


So the solution is to enable access assistive devices, or change your Firefox tab settings.


Another way we might want to make "open in firefox" work would be to save a temporary file and set it's "open with" property to FireFox.
I think that's the old school creator flag. I know there's a way to set that property from the shell.
Then you'd just have to replace the contents of the file and use the open command.

thomas Aylott — subtleGradient — CrazyEgg — sixteenColors