Author Topic: bad caching of thumbnails  (Read 3091 times)

Alejandro Kurczyn

  • Full Member
  • ***
  • Posts: 516
bad caching of thumbnails
« on: October 01, 2006, 19:59:41 pm »
Phew! This one took me a few hours to debug.

I'm running Joomla 1.0.11 + VirtueMart 1.0.7 on IE 6 and FF, moving out from Zen-Cart, I migrated a few items to tryout the moving process and finally understood how the dynamic thumbnail creation works when entering information right into the database (both image filenames must be equal!), however something strange happened:

Everytime I browsed an item picture, the first time it would show normally, but if I reloaded the same page, i got a 500 error, and if I reloaded yet again then the image will came back fine!! This I tried over 50 times and it was always the same: First image OK, second was an error, third was OK, fourth was an error and so on....

I traced this to /components/com_virtuemart/show_image_in_imgtag.php playing tricks with the browser cache, and fixed by commenting line 86 as follows:

Code: [Select]
// header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', @filemtime( $fileout ) ) . ' GMT' );
This was really frustrating, so I hope this helps somebody else... :-)

BTW, I just love dynamic thumbnail creation!


  • Jr. Member
  • **
  • Posts: 68
    • USPS Plugin for Virtuemart 2.0
  • VirtueMart Version: 2.0
Re: bad caching of thumbnails
« Reply #1 on: October 26, 2006, 14:34:14 pm »
Thanks so much Alejandro, this was a frustrating problem for me also.

The problem would not happen when running the product on my local machine but when I uploaded the store to my service provider which is in another timezone the images would not load every other time.

I appreciate you posting your solution.
Chaz Mezan
Park Beach Systems, Inc.

USPS Plugin for Virtuemart 2.0-


  • Jr. Member
  • **
  • Posts: 62
Re: bad caching of thumbnails
« Reply #2 on: November 18, 2006, 23:31:05 pm »
Thank you so much Alejandro. I have been looking for a solution for this same problem for almost a week. Excluding more and more and finally found your solution.