Cookies stored with a path option are treated somewhat differently in Internet Explorer than they are in many other browsers. The issues are especially prevalent in modern web applications with “clean” urls.

For example, a cookie stored with a path of /movies/the-wizard-of-speed-and-time is not visible to Internet Explorer users visiting /movies/the-wizard-of-speed-and-time, but is visible to Safari and to Firefox users.

The Wizard of Speed and Time

To deal with this issue it is necessary to issue the cookie with a path one directory higher than the specific page you’re looking at. Additionally, the cookie name needs to be disambiguated from other movie-specific cookies since the path scope /movies is no longer exclusive to a single movie.

Also remember, cookie paths are case-sensitive, so your application should either issue a cookie whose path matches the request the user issues, or the user should be redirected to a canonical, normalized url.

Leave a Comment

Enclose code in <code lang="ruby"></code> if you care.
Preview your comment using the button below.