Forum Moderators: bakedjake
I have a new hosting company that I signed up with last month. In development testing with their server I noticed my requests were pulling a lot of bandwidth. I started noticing that all the images looked as if they were being loaded everytime I came to a page. In other words, they don't pop-up automatically like they are cached.
It's not that I have caching turned of on my browser or anything like that. In a single user session all the images will load from the server, everytime I request a page even if I am just going to the same page everytime.
The reason I know it's the server is because I of course noticed there was a problem and loaded the content on my another hosting companies server and did not replicate the problem. I have also replicated this problem on 4 other PC's.
The guys who run the Unix server I think are a bit new to hosting, they have everything setup but they have bugs they are trying to work out. I believe this is one of the bugs.
I have been in contact with them about this issue and they aren't real sure why this is happening. The main reply I got was this: "One issue that this may involve is the expires module in apache."
I can provide URL's to show the problem.
This of course is a major problem because I'm getting full page loads from the server whether the user has been there before or not, resulting in major bandwidth usage, thus resulting in $$$ for bandwidth.
Thanks, Rob
[edited by: 3xWild at 1:27 am (utc) on Oct. 6, 2003]
Welcome to WebmasterWorld [webmasterworld.com]!
Just a note: We don't do tag lines or post our own site URLs here at WebmasterWorld - Please review the Terms of Service.
It is probable that you don't have correct server headers set up. If your host has enabled mod_expires, then *you* control that aspect. A setting in httpd.conf or .htaccess of ExpiresActive on will enable them, and you can then specify an expires time or a relative time-to-live.
Check the server headers [webmasterworld.com] returned when you request an image from your site, and make sure your get an expires header. You may also want to check your Last-Modified, ETag, and Cache-Control headers, since all of them interact to control caching.
Here's a sample response for a logo on one of my sites:
HTTP/1.1 200 OK
Date: Mon, 06 Oct 2003 01:06:42 GMT
Server: Rapidsite/Apa/1.3.27 (Unix) FrontPage/5.0.2.2510 mod_ssl/2.8.12 OpenSSL/0.9.7a
Cache-Control: max-age=2592000
Expires: Wed, 05 Nov 2003 01:06:42 GMT
Last-Modified: Wed, 20 Nov 2002 02:02:52 GMT
ETag: "1c96c91-d54-3ddaed4c"
Accept-Ranges: bytes
Content-Length: 3412
Connection: close
Content-Type: image/gif
Also, here's a caching tutorial [mnot.net] that might come in handy.
Jim
After completing a server check for one of the images on their home page, I realized they weren't including an expires header.
HTTP/1.1 200 OK
Date: Mon, 06 Oct 2003 01:33:04 GMT
Server: Apache/1.3.28 (Unix) mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.0 FrontPage/5.0.2.2634 mod_ssl/2.8.15 OpenSSL/0.9.6b PHP-CGI/0.1b
Vary: Accept-Encoding
Last-Modified: Sun, 08 Dec 2002 23:07:17 GMT
ETag: "3f8120-77e-3df3d0a5"
Accept-Ranges: bytes
Content-Length: 1918
Connection: close
Content-Type: image/png
Sorry, I didn't mean to violate the T&C intentionally, I of course just skipped over them. That's what I get for skipping. I've edited my last post to remove any violations.
Thanks again for your help.
- Rob