[dancer-users] Setting static files to 304 - Not modified

Matt Mallard mqm at Q-Technologies.com.au
Tue Dec 3 03:24:57 GMT 2013


Hi,

I've using Dancer2 with Plack/mod_perl with Apache (I was previously 
using Dancer with CGI, but can't get CGF or FCGI to work with Dancer2).

How to I set my static files to report '304 - Not modified' to the 
browser?  When I use Firebug to look at all the file load times and turn 
browser caching on, all the files from CDNs report '304 - Not modified', 
but all those served through Dancer report as '200' and hence are 
transferred each time.  This is fine for the dynamic pages, but 
unnecessary for the static files (logos, css, javascripts).

Thanks,
Matt




More information about the dancer-users mailing list