No-Library (pure JS), HTML, CSS, JavaScript
jQuery Compat (edge), HTML, CSS, JavaScript
Cookies without libraries
Sample with promise in jquery