You may test the cookie examples in one of the following ways:
view the page off a remote web server.
view the page off a local web server, such as XAMPP or a nodejs web
server
view the page off the local file system to test session cookies
without using a web server. In that case, you shoud preview it using
Firefox. If the visual inspection tool doesn't work, use FF's Console
tool to inspect the cookies by issuing command, document.cookie.