Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookies work on some computers, not others

Status
Not open for further replies.

silverspecv

Programmer
Oct 31, 2003
125
US
I'm a web developer, and I've already posted this in the appropriate programming forum, but I'm trying here as well. I have a simple password-protected download page. When you log in, it sets a cookie, and forwards you to the download page. Very standard stuff. But on some computers (only on IE6), then login is successful and forwards you to the download page, but if you refresh the page, it dumps back to the login page.

I have set up a temporary username and password in case anyone would be so kind as to have a look at it and list your os/browser specs and whether or not you are able to refresh and stay logged in.

username: tek
password: tek

It works fine from all computers using Firefox, but about 50% of pc's fail using IE6. The funny part is that the download page checks for the cookie, so the fact that you can view the page the first time means that the cookie existed at least for a moment, but when you refresh the page, the cookie is gone.. so some time after the page initially checks for the cookie, it craps out. It could be while the page is loading, or some time after clicking refresh, I dunno..

PS, I have read all the cookie threads on here, so I have tried pretty much everythign in the internet options control panel. Also, these are win2k machines with no firewall, and I have also tried a different p3p statement that someone posted.. I have also experimented with setting the cookie with no expiration (close of browser), never, etc.. no luck there either

It's a real head-scratcher
 
Nevermind, I figured it out.. for anyone who knows coldfusion, the correct way to set the cookie in this instance is:

Code:
<cfcookie name="member" value="#login.id#" domain=".oncourselearning.com" path="/resellers">

I tried several variations, but the above finally worked.. that doesn't mean there isn't a bug in internet explorer, because there still could be.. after all it worked fine in multiple browsers, and even ie6 on different pc's behaved differently, but anyway, it's fixed..
 
are any of the PCs running blockers, i.e. spybot, adaware, etc?

also are the allow cookies setting the same on all of the PCs?
 
Some of the machines have spybot and adaware installed but not running. None of them have software firewall of any kind.

I have a wide collection of machines here, including windows 2000 server and professional, windows 98 se, windows 2000 advanced server running terminals, and windows xp pro.. I found the issue to occur on a 2000 pro (but not all), 2000 server, the terminal server, and 98se machines (one of each). The 2000 server machine has been heavily stepped on over the years, but the pro and 98 machines are relatively stock.. I did compare the internet options dialog box between some of the machines and there were slight differences, but even when I made them the same, it didn't change anything.

Anyway, it's fixed now.. I spent several hours beating my head on it, and I'm now going to chalk it up to general IE goofiness.
 
Any user can disable cookies on their machine from most (if not all) browsers.

*cLFlaVA
----------------------------
[tt]Sigs cause cancer.[/tt]
 
Cookies are enabled. Trust me, I have been through the ringer fighting with cookies a time or two. My oncourselearning.com site has over 20,000 registered users, so I have done some troubleshooting in my day. But on that site I never tried to set a cookie from anywhere but the root directory, so this one was new to me. I fixed it by setting the cookie differently, but that does not explain why it works some places and not others. I'm maintaining my position that it is some type of bug or inconsistency in IE.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top