This blog has moved!

If you are not automatically redirected to the new address, please direct your browser to
http://www.juxtaservices.com/blog/
and update your bookmarks.

Sunday, June 10, 2007

Favicon.ico 404 Errors

Upon recently perusing the Apache error/access logs within my sys admin dominion I discovered a massive number of 404 errors occurring. This was evidenced by the accessing of a custom 404 page which is redirected to by another default script if what is requested is not found. Since this page was the result of a redirect, in order to determine what URL was causing it, it was necessary to scan the access log to see what had been requested by the same IP just before the 404 page was accessed, thereby indicating what resource was being requested that was triggering the 404 script. After briefly reviewing the access log, it became evident that the culprit was a request for favicon.ico in the root web folder.

Favicon.ico is the default means of displaying a custom icon in the URL bar of most modern web browsers. Most commercial websites populate this image with their corporate logo for further site recognition and customization. If you go to http://www.blogger.com, you will notice that the favicon is the orange blogger "B". Well, apparently most web browser will look for favicon.ico in the root of the web folder of the site being accessed. Because of the custom 404 scheme of the site in question, the lack of this file in said location was causing a 404 to occur. Upon doing a bit of digging, it was discovered that while there was a favicon being used, it was displayed using an alternate JavaScript method (probably for better cross-browser compatibility), and that indeed no favicon.ico file existed in the document root. This was remedied by creating a symlink in the root to the location where the JavaScript solution was pulling the favicon from. This seems to have removed these 404 errors, causing the remaining errors to be more discernible and hopefully easier to address.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home