Forum OpenACS Q&A: Images getting lost with ns_returnfile on Win
did anyone ever experience this behaviour: On subsequent pages with lots of images presented by ns_returnfile images get lost.
Example: I have 10 images per page and go on with hitting a "next" button. After about 20-30 images more and more images are not rendered until no images at all are rendered. This is on Win machines and IE and Opera. NS only sometimes.
Could this be related somehow to keepalive problems?
I did it like this:
(10 times on a page)
the returnimg.tcl simply calls ns_returnfile.
The browser gets so confused it gets also in trouble with other images once the problems begin.
Really strange behaviour!
ns_returnfile should return binary content fine on any aolserver.
Do you have a page I could visit to see this happening?
I'm sorry, this is not yet a site connected to the Internet.
But I used Ethereal to view the page headers sent between the client and AOLserver.
It seems like Opera and IE both send "If-Modified-Since" Keys and AOLserver responds happily with "304 Not Modified" but only Opera renders the images then.
Maybe this path is worth investigating on.
I first thought the problem is related with a "max-age" key (of 3600 seconds) I'm returning in the header with the file as AOLserver itself returns also a "Last-Modified-Since" and maybe the two keys conflict (Unexcusable non-reading of Cache/Proxy Documentation on my part...). Strange thing.
Do you know where to start/tweak configs to FORCE the server to never respond with a L-M-S key? I'll try to overwrite this in my script now but I'll guess it happens somewhere else.
I have to ns_set idelkey [ns_conn headers] "Last-Modified" to force ns_returnfile to not ignore the status code of "200" I call it with. When I do it, Int. Explorer always receives the images with ns_returnfile - I validated this with Ethereal.
BUT! this Â§&$&Â§& IE does not render them.
I give up. Never try to understand your computer.
GET /images/img.adp?img_id=171 Accept: */* Referer: http://intra:8000/people/col1/browse.adp?step=30 Accept-Language: en Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Host: intra:8000 Connection: Keep-Alive Answer AOLserver to Internet Explorer 6.0: HTTP/1.0 200 OK Cache-control: max-age=3600 Last-Modified: Sat, 13 Apr 2002 10:14:37 GMT MIME-Version: 1.0 Date: Tue, 25 Jun 2002 15:03:14 GMT Server: AOLserver/3.4 Content-Type: image/jpeg Content-Length: 13129 Connection: keep-alive (Image is not rendered) Request with Opera 6.0: GET /images/img.adp?img_id=173 User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.0 Accept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, //*/* Accept-Language: en Accept-Encoding: defalte, gzip, x-gzip, identity, *;q=0 Referer: http://intra:8000/people/col1/browse.adp?step=30 If-Modified-Since: Mon, 22 Apr 2002 08:06:42 GMT Host: intra:8000 Connection: Keep-Alive, TE TE: deflate, gzip, chunked, identity, trailers Answer AOLserver to Opera 6.0: HTTP/1.0 304 Not Modified Cache-control: max-age=3600 Last-Modified: Mon, 22 Apr 2002 08:06:42 GMT MIME-Version: 1.0 Date: Tue, 25 Jun 2002 15:17:33 GMT Server: AOLserver/3.4 Connection: close(Image is rendered, in general, I have no problem with Opera or Netscape or ...)
My site is at http://www.corrida.ca/