March 26, 2011
So . . . I’ve logged in to netflix.com recently so I’ve been cookied by them. Now I read boston.com, and it launches one of those damn “pop under” NetFlix ads. Eh? Hey, guys, how about detecting that I’m a NetFlix subscriber and not showing me that stupid ad!?
Ditto, New York Times. I subscribe to [...]
Read the full article →
March 25, 2011
For future reference:
To set expires headers on responses coming from your /assets path:
Add rack-contrib to your Gemfile
In config.ru, before your “run”:
require ‘rack/contrib’
use Rack::StaticCache, :urls => [ '/assets', '/images', '/javascripts' ], :root => ‘public’
The default is one year. For two, add :duration => 2 after the :urls specification.
That is all.
Read the full article →