Hello everyone In rails how can add an expires header. In which file i need write expires year code? Please advice. -- 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 To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/uLnVtOzeYCgJ. For more options, visit https://groups.google.com/groups/opt_out.
If you are running on production environment then you can add expires headers on nginx configration file On 21 August 2012 18:08, Saravanan P <saravanan.p-tks5Z7IV8F8RmelmmXo44Q@public.gmane.org> wrote:> Hello everyone > > In rails how can add an expires header. In which file i need write expires > year code? > > Please advice. > > -- > 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 > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/uLnVtOzeYCgJ. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- -------------Regards--------------- G SubbaRao Cell:08970668850 E-Mail:subbarao.kly-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org -- 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 https://groups.google.com/groups/opt_out.
hi
sorry for my ignorance, in my server which file i need to enter expires
code like
<ifmodule mod_expires.c>
<filesmatch "\.(jpg|gif|png|css|js|ico)$">
ExpiresActive on
ExpiresDefault "access plus 1 year"
</filesmatch>
</ifmodule>
On Tue, Aug 21, 2012 at 6:42 PM, G S RAO
<subbarao.kly-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> If you are running on production environment then you can add expires
> headers on nginx configration file
>
> On 21 August 2012 18:08, Saravanan P
<saravanan.p-tks5Z7IV8F8RmelmmXo44Q@public.gmane.org> wrote:
>
>> Hello everyone
>>
>> In rails how can add an expires header. In which file i need write
>> expires year code?
>>
>> Please advice.
>>
>> --
>> 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
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/rubyonrails-talk/-/uLnVtOzeYCgJ.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> -------------Regards---------------
> G SubbaRao
> Cell:08970668850
> E-Mail:subbarao.kly-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>
> --
> 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 https://groups.google.com/groups/opt_out.
>
>
>
--
Regards by
Saravanan.P
--
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 https://groups.google.com/groups/opt_out.
On Tue, Aug 21, 2012 at 7:38 AM, Saravanan P <saravanan.p-tks5Z7IV8F8RmelmmXo44Q@public.gmane.org> wrote:> Hello everyone > > In rails how can add an expires header. In which file i need write expires > year code? > > Please advice.response.headers[''Expires''] = CGI.rfc1123_date(10.days.from_now) -- 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 https://groups.google.com/groups/opt_out.