No more pets

Posted in pets at 12:29 am by wingerz

Jen and Jordi came by last night to pick up Fred and George. I was quite sad to see them go, especially because they were finally starting to feel comfortable in the house and around us. Fred was still on the timid side but I took comfort in the fact that he continued to hide under the bed even when Jen (A. M.) tried to coax him out.

Random observations:

  • Only George knew how to open doors that we left a bit open – he was quite good at sticking his paw into doors that opened towards him and getting up on his hind legs to push doors that opened away from him.
  • The cats like turkey (I fed them while making sandwiches for myself).
  • One night I left a half-consumed can of cat food on the counter. A few minutes after turning off the lights, I heard the spoon fall out of the can. Coming out to investigate, I heard one of the cats jumping off the counter. It seems that they know they’re not supposed to be on counters and tables.
  • George is awesome at catching his red and white octopus with his front legs.

All in all, it was a fun experience, and I’m glad that Jen and Jordi trusted me with their beloved pets.


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.

« Previous Page « Previous Page Next entries »