The problem with the expires argument is that you have to set it to a specific date, but I don't think you can be sure what timezone / clock setting the user's browser has - which means that it's pretty much impossible to reliably set a cookie that expires in a couple of seconds time.
Hopefully I'm wrong - I'd love to know if there's a workaround for that issue.
Hopefully I'm wrong - I'd love to know if there's a workaround for that issue.