Forum: Ruby on Rails Using send_file and handling browser side cacheing

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
mezza (Guest)
on 2007-03-08 12:49
(Received via mailing list)
I'm using send_file to send rather large SWF files that I'd prefer the
end browser to cache to reduce my bandwidth usage.

I've used the method suggested by madrobby (
2005/08/28/internet-explorer-and-ajax-image-caching-woes) to try to
catch the HTTP_IF_MODIFIED_SINCE request header, and then return HTTP
304 if necessary. However, this only seems to work reliably with
Firefox and IE7, and not Safari. Oddly, even with Firefox, I don't
actually see the HTTP 304 response in my lighttpd logs though.

Does anyone know of a practical solution to this?

FYI, I'm using lighttpd with FCGI instances of my rails app.


This topic is locked and can not be replied to.