Thanks for that but it’s not as helpful as I’d hoped.
I began learning javascript a week or two ago. I’m reading Pollock’s Javascript - A Beginner’s Guide. It is just Chrome since my code does work in IE and Firefox. I’m sure I would eventually have come across the more updated/proper ways of handling cookies but for now I’m looking to find out why my code doesn’t work in Chrome. If it’s very important that I immediately abandon the way Pollock’s book is teaching me then I could do with some reasons why.
I’m trying to understand the code, I don’t want to simply memorize some code that works, I want to understand why it works better or why my code was faulty.
Google Chrome is much more secure than other web browsers. As a result of that, a local web page has no cookie privileges. It’s only if the page is running from a web server that it has permission to use cookies.