now client side js is using cookies