Shane O'Sullivan's technical blog… really ties the room together

Archive for the ‘Firefox’ Category

Firefox 3 has proper modal dialogs!

Posted by Shane O'Sullivan on June 25, 2008

The application I work on for my employer makes extensive use of modal dialogs in Internet Explorer.  These are a nice feature where you can load a page in a dialog box, and the user cannot access the parent window until the dialog has closed – this includes forward/back buttons, menus, everything.

An issue we have had with supporting Firefox 2 is that it doesn’t support modal dialogs.

It seems to have completely been missed by the Firefox 3 fanboys, but Firefox 3 supports modal dialogs.  See my previous post on tips on how to use them.  This is a very very cool thing which I’m sure many people will find use for.  There aren’t many examples of modal dialog use around, since up until now it was IE-specific, but hopefully it’ll become much more popular.

The Mozilla team seem to have simply copied the window.showModalDialog function exactly from Microsoft, so any code previously used to open modals in IE works just fine in FireFox 3.

You’ve got to love open source: out-innovating the proprietary guys 99% of the time, then copying whatever you missed 🙂

Update: I’ve confirmed that in FireFox 3 modal dialogs, unlike in IE, when you click a hyperlink the resulting page will correctly open in the dialog, and NOT open a new window.  This makes them infinitely more useful, and should negate the need for the horrendous hacks that IE forces on people.

Posted in Firefox, modal | 12 Comments »

Why is my web page slow? YSlow for Firebug can tell you.

Posted by Shane O'Sullivan on July 25, 2007

Yahoo have released a very useful extension for Firebug, which is itself an extension for Firefox, which can be used to analyze a web page’s performance. The extension, called YSlow, appears as a separate pane in Firebug, and gives you a whole load of statistics about your page.

However, in addition to the bare numbers, it also gives your page a ranking, from zero to a hundred, and offers tips in plain English on you can improve the performance of your page.

All in all, a very handy little addition to a web developer’s toolkit.

One caveat is that it is of course not perfect – I tried to use it on Gmail, and it gave the site a 98% mark (practically impossible to achieve in reality), as the initial page of the Gmail application simply loads a single JavaScript page and not much else. Therefore, YSlow seems to only analyze content sent down the wire to browser upon page load, and ignores generated content. However, this does not take away from the fact that it is perfectly suitable for the vast majority of websites out there.

More information available here, or read Ajaxian’s post here.
Share this post:digg it|kick it|Email it|bookmark it|reddit|liveIt

Posted in Ajax, Firebug, Firefox, Javascript, Technical, tools | 1 Comment »

GreaseMonkey script to add Digg-like links to posts

Posted by Shane O'Sullivan on May 22, 2007

I decided today that I wanted to put links at the bottom of each of my blog posts that would allow people to perform actions on the post, e.g:

My blog is on which doesn’t seem to have a plugin that will allow me to do this. So, I got off my ass and wrote a GreaseMonkey Firefox script that’ll do it for me. You can download this script by going to and clicking the “Install This Script” button.

The links that are inserted are at the bottom of this post. The script is open source (GPL license), so take it, play with it, whatever. If you find any bugs, please let me know by commenting on this post.
Share this post:digg it|kick it|Email it|bookmark it|reddit|liveIt

Posted in Ajax, Firefox, greasemonkey, Javascript | 11 Comments »

A Web Server in Firefox for quick prototyping of Ajax apps

Posted by Shane O'Sullivan on February 9, 2007

Ajaxian has posted an article about the Plain Old Webserver (POW), a web server that runs from inside Firefox. This is a strange idea at first look, but after trying it out it seems to work quite well.

The most applicable use that jumps out at me is for prototyping Ajax applications from your local file system without having to install Apache (or another web server). So, just click on a single link, restart Firefox, and you have a web server running on your system. You then drop files into it’s folder inside your user ( or ~ ) home folder, and they’re available for browsing in any web browser on your system, not just Firefox. You can also make the files available to other machines.

From an Ajax developers perspective, the main advantage to this over working directly from the file system is that you are testing in a more realistic envrionment, with the same security measures being applied as will be used when your application goes live. For example, IE7 will not let you do XHR requests if you are running from the local file system. Also, you don’t have to go to the trouble (ok so it’s not THAT much trouble) of installing Apache.

One issue I found with the server was when attempting to enable debugging on Dojo using the Firebug console, using the dojo.require(“dojo.debug.console”) command. It froze the browser, and I had to kill it.  However, all other remote XHR requests worked just perfectly.

All in all, this is a very cool concept, and I can definitely see myself using for quick prototyping of Ajax applications.  Well done David Kellog!

Posted in Ajax, Apache, Dojo, Firefox, Javascript, open source, Technical | Leave a Comment »

%d bloggers like this: