How to get cookie expiration time in Rails?
cookies, ruby-on-rails, set
Solution
That's right, only cookie-name and cookie-value are returned.
This is not a shortcoming of Rails or PHP, it is defined this way in RFC 6265:
Notice that the cookie attributes are not returned. In particular, the server cannot determine from the Cookie header alone when a cookie will expire, for which hosts the cookie is valid, for which paths the cookie is valid, or whether the cookie was set with the Secure or HttpOnly attributes.
Problem
I readed here: Get cookie expiration that only name and value are sent to the server so no other cookie data is available. That means that there is no way to get the expiration date of the cookie? So i have to save that date in my database, if i need it later?