Wayne,


This is a little odd.



I just took a quick look at this is detail and I see that perhaps you’ve added 
a timestamp? I see an argument like _=12345678901234



However, it’s on the incorrect link. You don’t need to response from the TAF to 
be refreshed, you need the image itself to be refreshed. Therefore it should be 
on the img as such: src=/imcaptcha/images/captcha.jpg?_12345678901234



Note, however, that if two people request captcha images at the same time, they 
might be crossed or corrupted because you are reading the same file name. I 
would recommend that you adjust your code so that the TAF responds the image 
data, like this: img src=/IMcaptcha/IMcaptcha.taf



In this case, you’ll have to build an http header for the img data and you can 
therefore spec the no-cache headings.



Robert



From: Wayne Irvine [mailto:wa...@byteserve.com.au]
Sent: Wednesday, April 25, 2012 12:23 AM
To: TeraScript-Talk@terascript.com
Subject: TeraScript-Talk: Image caching



Just another interesting anomaly with my CAPTCHA routine.



This works:



http://isellit.com.au/imcaptcha/ajax.html



Click on reload and the image is refreshed without reloading the page.



This doesn't:



http://ideaaustralia.com.au/imcaptcha/ajax.html



When you click reload it makes the call to the server and creates the new image 
but the browser doesn't request the new image from the server. It sticks with 
it's cached version. So no reload.



The code is the same.

The working version is on a Lion Server running OSX 10.7.3, Apache 2.2.21 and 
Terascript 6.1.5.

The non-working version is on OSX 10.6.8, Apache 2.2.21 and Witango 6.0.7.



Although the Apache versions are the same the httpd.conf files are wildly 
different as they are installed as part of OSX. It is here that I have spent 
most of my efforts so far, playing around with caching plug-ins and settings 
and expire times to no avail. Essentially I want the server to cache images but 
not this one. I'd be happy for it just to work like the Lion server.



Which leads me to why I am asking this question here. The major difference 
between these two set ups is the version of Witango/Terascript. It is 
conceivable that Witango is returning the image reference with a different 
header to Terascript and causing the browser not to reload the image. Is this a 
known change/bug fix between versions and should I just get around to 
installing the current version on my production server as well as my 
development server?



Any other input would be most welcome too.



Wayne Irvine



  _____

To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.



----------------------------------------

To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.

Reply via email to