Thanks Jon, I'm not bothered which layer handles it. Just wondered what the options are. Am using merb on Mongrel. Many thanks, George
On Oct 1, 7:35 pm, Jonathan Stott <[email protected]> wrote: > Hi > > Normally it's expected that static assets are handled by the front end > webserver, such as nginx, which generally make it quite easy to set > whatever expiry header you want. They'll also serve the file a lot > faster than merb will, and without tying up the ruby process. If you > really want to do the serving in merb (or, well, ruby) you could look > into rack middlewares, such as Rack::StaticCache[1] which is included > in the rack-contrib gem. By adding that, or something like it, to > your config/rack.rb to replace the existing static file server, it > should add appropriate cache control headers > > Regards > Jon > > [1]:http://github.com/rack/rack-contrib/blob/master/lib/rack/contrib/stat... > > On 1 October 2010 09:24, George Adamson > > > > > > > > <[email protected]> wrote: > > Currently using standard html <script> and <link> tags in the > > application.html.erb. > > > Is there a way to serve scripts and css with a custom expiry header? > > > Many thanks, > > George -- You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/merb?hl=en.
