HTPC photos

I promised over a month ago some photos of my custom HTPC, so here they are:

The front of the box showing the 20x2 LCD, the slimline Optiarc BC-5600S Blu-Ray/DVDRW and two of the USB ports
The front of the box showing the 20x2 LCD, the slimline Optiarc BC-5600S Blu-Ray/DVDRW and two of the USB ports
The untidy guts of the box showing the Zotac ION ITX motherboard on the right, the 700GB Western Digital HDD and the Slimline BD/DVDRW Drive. There are two 1GB sticks of DDR2 RAM under the optical drive. Notice the unused horizontal slots in the case at the rear of the box
The untidy guts of the box showing the Zotac ION ITX motherboard on the right, the 700GB Western Digital HDD and the Slimline BD/DVDRW Drive. There are two 1GB sticks of DDR2 RAM under the optical drive. Notice the unused horizontal slots in the case at the rear of the box
The back of the case showing the multitude of connections: PS/2 mouse, USB Wi-Fi Siemens stick, optical S/PDIF output, HDMI, VGA, analog audio out and the DC power cable (the brick is out of view)
The back of the case showing the multitude of connections: PS/2 mouse, USB Wi-Fi Siemens stick, optical S/PDIF output, HDMI, VGA, analog audio out and the DC power cable (the brick is out of view)

The box is running Ubuntu 9.10 (aka Karmic Koala) and XBMC which takes advantage of the ION’s PureVideo capabilities via VDPAU.

Share

Static resources versioning in web applications

I recently had trouble with a Javascript-heavy application which was deployed to the end users quite frequently in its initial stages. The problem was that users were seeing bugs which had been fixed with the latest release and that was because their browsers were caching the static resources of the web application for too long. A forced refresh (Ctrl+F5 or Ctrl+R) solved the problem but I wanted a better, automatic way.

The solution was to add a version to the path of each static resource and then use url rewriting to get the real file. In practice in my HTML I refer to resources like this:


In my case the 1.0.6 is the pom.version which I get using Maven resource filtering. I then use the wonderful URL Rewrite Filter (but I could also have used Apache’s mod_rewrite ) to rewrite URLs matching

^/[0-9]+[a-zA-Z0-9\.\-]+/(js|css|img)/(.*)$

to

/$1/$2

I think I’ll go back and apply this fix to all my apps 🙂

Share