fixes #2450 - cookie name based on pathname to be able to reuse the js in other pages