Image.module 4.3.0 installed on Drupal 4.3.0, using PostgreSQL.
I did a "Directory Upload: Fast" of three images to test this feature. Everything works fine, but I was noticing that the images were slow to load, even after returning to a page I had already viewed. Watching the apache log file, I noticed that the images were not caching (HTTP status code 200).
I've tried this on Mozilla (Win), Safari (Mac), IE (Mac) and IE (Win). It seems it only happens on Mozilla (v1.4) in *all* cases, whether I Reload the page, or use the "next image/previous image" navigation. In both cases, Mozilla GETs everything. Under Safari, a Reload returns HTTP 200 (resending all data), but the "next/previous" navigation only GETs the node (i.e. "/node/view/21"). IE, both platforms, GETs everything but receives a 304 return code.
Of these different options, I'd say that IE is doing it correctly. Safari is slightly less broken, and Mozilla is wasting bandwidth.
I tend to think this is an image.module problem because things seem to be working more-or-less correctly elsewhere. (For example, on the home page, Mozilla GETs the node "/", but nothing else, getting a 200 return code, even with thumbnails on the home page; IE GETs everything, but gets a 304 returned for all of it)
Here's a snippet of the log, with my ##comments interspersed, IP address is xxx.xxx.xxx.12:
## Safari, clicking the "previous image" link
xxx.xxx.xxx.12 - - [15/Dec/2003:21:44:36 -0600]
"GET /node/view/22 HTTP/1.1" 200 7453
## Safari, clicking Reload
xxx.xxx.xxx.12 - - [15/Dec/2003:21:44:46 -0600]
"GET /node/view/22 HTTP/1.1" 200 7453
xxx.xxx.xxx.12 - - [15/Dec/2003:21:44:47 -0600]
"GET /misc/drupal.css HTTP/1.1" 200 4850
xxx.xxx.xxx.12 - - [15/Dec/2003:21:44:47 -0600]
"GET /misc/menu-expanded.gif HTTP/1.1" 200 826
xxx.xxx.xxx.12 - - [15/Dec/2003:21:44:47 -0600]
"GET /themes/deadgobot/deadgobot.css HTTP/1.1" 200 4578
xxx.xxx.xxx.12 - - [15/Dec/2003:21:44:47 -0600]
"GET /misc/menu-collapsed.gif HTTP/1.1" 200 53
xxx.xxx.xxx.12 - - [15/Dec/2003:21:44:47 -0600]
"GET /misc/menu-leaf.gif HTTP/1.1" 200 829
xxx.xxx.xxx.12 - - [15/Dec/2003:21:44:47 -0600]
"GET /themes/deadgobot/images/logo_top.gif HTTP/1.1" 200 1610
xxx.xxx.xxx.12 - - [15/Dec/2003:21:44:47 -0600]
"GET /themes/deadgobot/images/logo_bottom.gif HTTP/1.1" 200 3934
xxx.xxx.xxx.12 - - [15/Dec/2003:21:44:47 -0600]
"GET /misc/blog.gif HTTP/1.1" 200 77
xxx.xxx.xxx.12 - - [15/Dec/2003:21:44:48 -0600]
"GET /images/dsc_2454-22.jpg HTTP/1.1" 200 73328
########################
## Mozilla (Win), clicking "next image" link
xxx.xxx.xxx.12 - - [15/Dec/2003:21:47:19 -0600]
"GET /node/view/22 HTTP/1.1" 200 5651
xxx.xxx.xxx.12 - - [15/Dec/2003:21:47:19 -0600]
"GET /misc/drupal.css HTTP/1.1" 200 4850
xxx.xxx.xxx.12 - - [15/Dec/2003:21:47:19 -0600]
"GET /themes/deadgobot/deadgobot.css HTTP/1.1" 200 4578
xxx.xxx.xxx.12 - - [15/Dec/2003:21:47:20 -0600]
"GET /images/dsc_2454-22.jpg HTTP/1.1" 200 73328
## Mozilla (Win), clicking Reload
xxx.xxx.xxx.12 - - [15/Dec/2003:21:48:16 -0600]
"GET /node/view/22 HTTP/1.1" 200 5651
xxx.xxx.xxx.12 - - [15/Dec/2003:21:48:16 -0600]
"GET /misc/drupal.css HTTP/1.1" 200 4850
xxx.xxx.xxx.12 - - [15/Dec/2003:21:48:17 -0600]
"GET /themes/deadgobot/deadgobot.css HTTP/1.1" 200 4578
xxx.xxx.xxx.12 - - [15/Dec/2003:21:48:17 -0600]
"GET /themes/deadgobot/images/logo_top.gif HTTP/1.1" 200 1610
xxx.xxx.xxx.12 - - [15/Dec/2003:21:48:17 -0600]
"GET /themes/deadgobot/images/logo_bottom.gif HTTP/1.1" 200 3934
xxx.xxx.xxx.12 - - [15/Dec/2003:21:48:18 -0600]
"GET /images/dsc_2454-22.jpg HTTP/1.1" 200 73328
########################
## IE (Win), clicking "next image" link
xxx.xxx.xxx.12 - - [15/Dec/2003:21:51:57 -0600]
"GET /node/view/22 HTTP/1.1" 304 0
xxx.xxx.xxx.12 - - [15/Dec/2003:21:51:57 -0600]
"GET /images/dsc_2454-22.jpg HTTP/1.1" 304 -
## IE (Win), clicking Refresh
xxx.xxx.xxx.12 - - [15/Dec/2003:21:52:28 -0600]
"GET /node/view/22 HTTP/1.1" 304 0
xxx.xxx.xxx.12 - - [15/Dec/2003:21:52:28 -0600]
"GET /images/dsc_2454-22.jpg HTTP/1.1" 304 -
xxx.xxx.xxx.12 - - [15/Dec/2003:21:52:28 -0600]
"GET /misc/drupal.css HTTP/1.1" 304 -
xxx.xxx.xxx.12 - - [15/Dec/2003:21:52:28 -0600]
"GET /themes/deadgobot/deadgobot.css HTTP/1.1" 304 -
xxx.xxx.xxx.12 - - [15/Dec/2003:21:52:28 -0600]
"GET /themes/deadgobot/images/logo_top.gif HTTP/1.1" 304 -
xxx.xxx.xxx.12 - - [15/Dec/2003:21:52:28 -0600]
"GET /themes/deadgobot/images/logo_bottom.gif HTTP/1.1" 304 -
Comments
Comment #1
bruno commentedI can't see why image.module could be involved in this behavior difference across browsers. The only setting that could prevent the caching of images is the 'Disable Image Caching' setting. Another parameter is the page cache setting for anonymous users.
Beside those two settings, once the image has been stored in the image dir, an image node display uses a relative link to the file on the disk for the thumbnail, the one you see in the GET. It is the same for all browsers, as I can see from your log. Maybe the cache setting is different for the three browsers, or they are not using the same method to cache images. Could the relative path being a problem?
Comment #2
rho@www.deadgobot.com commentedIf it's a browser cache issue, all browsers will see the same problem, since the cache settings on all of them are default for the browser/platform.
I spent some time paging through the module, and I agree that it's unlikely to be an image.module issue.
I toyed with the system-wide cache settings, turning it off, then back on, and now it seems to be working as it should. Go figure.
Comment #3
bruno commentedInteresting. The system-wide cache has some influence then. Have you seen a difference in the page headers before and after you played with the settings?
I will close this support request for image.module, but feel free to reopen one on drupal if you think there is a problem with the caching mechanism.