I'm always looking for ways to make my sites faster.
Besides the obvious - small file size - are there any proven ways to make images load faster?
And I don't just mean a faster arrival time - I'm also interested in lowering the CPU load, less processing, optimizing at the server, faster disk I/O. For me, "fast" means a better user experience, but it's also a key ingredient of scalability.
- loading images from a different web server? Some say yes, some say no. Which is better?
- use CSS sprites. One big image will load faster than many small ones, saves disk I/O, less connections & HTTP overhead.
- put image dimensions in the HTML markup. True since the early Netscape days: providing the browser with image dimensions helps the browser draw faster.
- preloading. Good idea, or wasteful pre-fetching?
- gzip: not effective on files that are already compressed. You save less than 1% or something like that.
Any others?