When adding some new features to my JavaScript, I find the remaining cookies are pretty hard to deal with that some of them were set by actions such as click, hover. So firstly I considered doing something to clean all cookie at once:

But I found there is no such an easy deleteAllCookies() method!

Now everytime you want to update your cookies, it’s OK just modifying the content of cookie_version_control.