js task to storage data in cookie