Whoops, I thought you were talking about the XHR thing, I didn't see exactly where the comment was.

No, there isn't a better way. Cookie manipulation from javascript is shit.