Cookie now accept both global and local settings
Add an option to set a cookie only if the referrer is not available