Cookie expire time only set 1 hour in the future?
-
Hi Kyle,
I’m investigating when the cookie with the favorites is expiring. I’m using your plugin on ‘cookies’ mode only and would like to retain the favorites settings indefinitely or until the user actively clears its own cookies.
In the code I find some references to time()+3600, but that seems very short to me for a favorite system.
I did some further digging but couldn’t completely comprehend the ‘syncing’ of the favorites => is the sync mechanism in place to avoid the cookies expiring prematurely?
Could you please tell me how I can adjust the cookie duration to ‘indefinitely’?
Quick tip (found out the hard way years ago) setting a cookie only 1 hour in the future is prone to not work on clients in very different timezones. Since the client browser time is more than 1 hour in the future, it immediately invalidates the cookie (I think).
Since our site is having customers from around the world, setting the cookie expire time to at least a day ahead may be a better approach.Thanks,
Ruud
- The topic ‘Cookie expire time only set 1 hour in the future?’ is closed to new replies.