I am updating a site that uses cookies to store information about registered users. Basically when the person visits the site, it displays text saying "Hello Jim etc" depending on the name in the cookie... The problem I am having is that I can only seem to access the data if the html file is in the same directory that the cookie is created from.

I took a look at the cookie and the path is set as:


which is the directory that the register.html file is stored in. Is this path what is stopping me from accessing my cookie from other directories?

I have never used cookies with JavaScript before so it's a bit frustrating. Maybe someone could point me towards a helpful tutorial too?

Thanks for reading