Revisions to cookie handling