turbolinks / turbolinks-classic

Classic version of Turbolinks. Now deprecated in favor of Turbolinks 5.
MIT License
3.54k stars 428 forks source link

Would be possible to set request_method to be a session cookie? #641

Open ivanxuu opened 8 years ago

ivanxuu commented 8 years ago

Method popCookie in turbolinks.js.coffee sets the cookie to expire in 1970, so this sets this cookie to never expire.

document.cookie = name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/'

If the expires section is omitted, the 'immortal' cookie becames a session cookie, so it will be erased when the browser is closed.

document.cookie = name + '=; path=/'

Is there any reason to not use a session cookie instead?

Thanks