Alexander Malfait
2011-Mar-16 14:34 UTC
Making Mongrel/WEBRick serve static assets with future expires header
I''m creating a Rails application which will be deployed to desktop machines, running both the webserver and the browser (it''s a test- taking application which needs to be able to run without an internet connection). For this reason, I''ll be running Mongrel or WEBRick, without an Apache/ Nginx in front of it as you would normally do. The browser will access the Mongrel directly. The problem I''m facing now is that it takes a while to load assets (javascript/stylesheets/images). Normally, I''d fix this by setting future expiry dates on these assets in the Apache proxy in front of the Mongrel/WEBRick, so that the assets are only requested once, and after that there is only one request per action. But in this case, there is no proxy, and i''m using config.serve_static_assets = true So the question is: is it possible to tell Mongrel/WEBrick to slap far- future expiry headers on the static assets? I''m using Rails 3 on Ruby 1.9.2. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Apparently Analagous Threads
- ActionView::Template::Error Not a directory vendor/assets/javascripts/ production
- Asset pipeline giving me hard time. Please help !!! - (rails 3.1.3)
- jquery error in production precompiled
- my webpage does not send emails confimation/notification
- jquery_ujs.js 404