Jump to content

set cookie.path to "server relative" value. need just one cookie for whole site!


micah1701

Recommended Posts

I'm using mod rewrite to make friendly URLs on my site.
so the url

/information/blah

is really running a file in the root folder like: 

index.php?information=blah 

My problem is that I'm using a javascript cookie but every time someone clicks a link and the URL changes, it creates a new cookie instead of updating the current cookie.

What is the work around for this?
when other problems came up from using the mod rewrite, I found I could just use the "server relative" value of all of my links within the site (ie just ad a "/" before the path) and that fixed the problem.  But I'm having some trouble doing that in javascript for this cookie.

I tried:  document.cookie.path = "/";

didn't help.  Other thoughts?  Thanks!!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.