10.23.06

Firefox 2.0 Release

Posted in firefox, technology, web at 11:48 pm by wingerz

firefox

I downloaded Firefox 2.0 earlier today but I guess I wasn’t supposed to. I’ll know better next time. The official release is tomorrow.

A few nice things I’ve noticed so far: 1) spellcheck in textareas (incidentally, but “spellcheck” and “textareas” are marked as misspelled) and 2) integrated feed subscription in the address bar (the orange feed icon is visible when you’re on a page with links to feeds, just click it subscribe), making the bookmarklets I mentioned in a previous post unnecessary. I’m sure some of the other new stuff will be be interesting to try out, like JavaScript 1.7 (what about other browsers?) and client-side persistent storage.

07.01.06

304 or 200?

Posted in development, firefox, web at 10:20 am by wingerz

When you make a request over HTTP, you can get a number of status codes returned (like 200 (OK) and 404 (not found)). One such code is 304, which tells the client that the page requested was not modified, meaning that the client can use the local cached version.

Unfortunately, when you make a XMLHttpRequest in Firefox (allowing you to make a HTTP request without refreshing the page) and the return status set by the web server is 304, the XMLHttpRequest.status property is set to 200. In most cases this is fine because it doesn’t matter whether the page came from a webserver or from the local cache – in either case, the content is available for use.

In our case we want to be able to query our server about a particular entity and only take additional action running some SPARQL queries) if the status code is 200. When our server returns a 304, we won’t do anything. But since Firefox only gives a 200 in this case, we’ve had to add a custom HTTP header.

I found some mention of this problem elsewhere. In my opinion, if a webserver returns a 304, that should get bubbled up to the client somehow since it has meaning beyond 200, so I filed a bug report. Sounds like not everyone agrees with me.

05.04.06

Firefox Extension Keysets

Posted in development, firefox at 8:43 pm by wingerz

I helped my friend and colleague, Elias, debug his Google Calendar Quick-Add Firefox extension a a few weeks ago. The problem was that on some machines (including mine) the keyboard shortcut was not registered correctly (even though it showed up when we ran KeyConfig). Since KeyConfig itself successfully added a keyboard shortcut, I extracted the code to take a look.

Apparently in some configurations newly created keysets in the extension’s overlay.xul file are not added to existing global keysets. I changed the code from this:





to this: