Make favicon.ico Small and Cacheable
How making favicon.ico Small and Cacheable improves Web site download performance
The favicon.ico is an image that stays in the root of your server. It's a necessary evil because even if you
don't care about it the browser will still request it, so it's better not to respond with a 404 Not Found.
Also since it's on the same server, cookies are sent every time it's requested. This image also interferes
with the download sequence, for example in IE when you request extra components in the onload, the
favicon will be downloaded before these extra components.
So to mitigate the drawbacks of having a favicon.ico make sure:
- It's small, preferably under 1K.
- Set Expires header with what you feel comfortable (since you cannot rename it if you decide to
change it). You can probably safely set the Expires header a few months in the future. You can
check the last modified date of your current favicon.ico to make an informed decision.
Imagemagick can help you create small favicons
Other Topics
Overview Web Site performance Improvement
Minimize HTTP Requests
Use a Content Delivery Network
Add an Expires or a Cache-Control Header
Gzip Components
Put Stylesheets at the Top
Put Scripts at the Bottom
Avoid CSS Expressions
Make JavaScript and CSS External
Reduce DNS Lookups
Minify JavaScript and CSS
Avoid Redirects.
Remove Duplicate Scripts
Configure ETags
Make Ajax Cacheable
Flush the Buffer Early
Use GET for AJAX Requests
Post-load Components
Preload Components
Reduce DOM Elements
Split Components Across Domains
Minimize the Number of iframes
No 404s
Reduce Cookie Size
Use Cookie-free Domains for Components
Minimize DOM Access
Develop Smart Event Handlers
Choose over @import
Avoid Filters
Optimize Images
Optimize CSS Sprites
Don't Scale Images in HTML
Make favicon.ico Small and Cacheable
Keep Components under 25K
Pack Components into a Multipart Document
Avoid Empty Image src