Tuesday, June 14, 2005

Fixing web applications

Informative read. There are at least two items mentioned that I now need to address with our web application at work. Speaking of which, before that link popped up in my RSS reader, I was trying to figure out why our web application would call the homepage twice for one page load in the browser. Turns out <link rel="home" href="..." /> was causing it. I don't know why but both Safari and Firefox were causing the associated Struts action to execute twice. Fetching the page with wget, however, resulted in the expected behavior.

Another page had a more severe problem. It would hit the homepage 8 or more times for every load. I traced down the cause of this problem to a simple JavaScript statement that preloads an image. It just hit me. The images no longer exist and so multiple 404s must've been firing (the 404 pages happen to share the homepage's Struts action). I'll leave in the strikethrough text for my co-worker(s) to laugh/scowl at.

Random note: if you google for rel link="home", the web application I'm talking about shows up as the third result. Odd.

1 comment:

Matt said...

Come party tomorrow
mlaroche@gmail.com

Good to meet you tonight