YSlow: Two page hits for the price of one! · Monday December 29, 2008 by Rudolf Vavruch
While working on a custom logging class in a Kohana PHP application, I noticed that the test log message was being written twice. Not only was it being written twice but the duplicate log entry was being written with a separate pid (see posix_getpid()).
In the Firefox output there was only one pid. Flumoxed I hunted through my code trying to find something that would cause a ninja version of the application to run. Finally in the Apache logs I saw that there were two hits made for each refresh.
That got me thinking. I had recently installed the YSlow addon in Firefox, and had set it to in the hopes of becoming more better acquainted with it through daily use. Turning off fixed the problem. YSlow obviously reloads the page in the background each time you refresh.
I haven’t done front-end work in while so I can safely leave YSlow off until I do. I am looking forward to making full use of YSlow.
As a foot note, I am finding Kohana PHP a joy to work with and I recommend anyone who is using or considering using a PHP framework to a have look at it.
Commenting is closed for this article.