I use the php solution in my website and it's also working for now. But no one knows if and when Y will tighten its security's features. The cookie's validity of 1 year is e.g. very convenient ...