We want you guys to be able to flickr really fast through our Supergirls, so we transformed our photo gallery into a rocket-fast AJAX-app. Keyboard addicts can use their arrow keys to navigate through the pics. Support for bookmarkable URLs and back button. Fancy script.aculo.us fades.
IE6 challenging us
“The biggest challenge was making it compatible with IE6. First, IE6 did not support
innerHTML very well so I had to create all objects via the DOM interface. Lot of work! Another tricky bug was the
void(0) issue which interrupts the requests to the servers. And we could not switch everything to
<a xhref="http://techblog.tilllate.com/#" mce_href="http://techblog.tilllate.com/#" onclick="aFunction();return false;"> because we have the ID of the picture after the hash sign”, Ciprian explains.
Solving the back button problem
“Even though I did research on the internet I did not find a solution which fits. I combined multiple solutions. It wasn’t a problem for Firefox because you have easy access to the history. For Internet Explorer we had to do it with an IFRAME.”
The tools of our choice
Before going online with the service we had a beta test phase with our 1000 photographers. Part of the testing was also a stress test with Proxy Sniffer. Even though the stress test showed a 4 times faster photoalbum compared to the legacy one the load on the servers exploded on the first busy weekend: 512 apache slots on the 20 servers just weren’t enough to handle all those additional HTTP-requests coming from the new gallery. :-/
Fortunately Stefan has ten more servers ready. They will be in place this weekend to tackle the +30% increase in page views due to the AJAX gallery.