Forum Moderators: not2easy

Message Too Old, No Replies

Images and bandwidth question

         

slobizman

3:17 am on Nov 11, 2003 (gmt 0)

10+ Year Member



I run a very active forum. I get about 2 - 3 million page views a month, each showing the forum "header" area up top that has my logo image and a couple of image ads. These total about 20K. I calculated out the number of pages times the size of the graphics and came out to 60GB a month just for the these images!

However, I then remembered that browsers cache images so they don't need to download them over and over, right? Since there are many, many redisplays of the same image to the same person in a discussion forum activity, I wouldn't really using this much bandwidth for this would I? Wouldn't a user only download it once, until for some reason it was cleared out of his cache?

I just want to make sure I'm thinking correctly here.

jdMorgan

3:48 am on Nov 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> Wouldn't a user only download it once, until for some reason it was cleared out of his cache?

Partially true.

Some visitors run with cache disabled, due to their "privacy and security" concerns.
On the other hand, some ISPs will also cache your resources, further off-loading your server and the 'net.
But some of them, like AOL, cache compressed versions of your images, which sometimes look awful.

For images, you will usually find that the default cache settings are rather short, since images rarely if ever change (and if they do, you can always use a different fielname to avoid problems). For this reason, you may want to look into specifying how long each type of file on your site is to be cached, and whether it needs to be checked for updates on each access. A decent reference is here: [mnot.net...] - Also see the cacheability checker utility. Implementation varies depending on your server type, but generally, you simply need to send back correct Expires, Last-Modified, and Cache-control headers for each file or file-type, as desired.

Jim