views:

637

answers:

3

If you have site following this pattern(http://xx.yy/ ) internet explorer does not hold any cookies . Any solution ?

+18  A: 

This is essentially by-design. The workaround is to put a "www" before xx.yy.

http://blogs.msdn.com/ieinternals/archive/2009/09/19/Private-Domain-Names-and-Public-Suffixes-in-Internet-Explorer.aspx

http://support.microsoft.com/kb/310676

http://crisp.tweakblogs.net/blog/ie-and-2-letter-domain-names.html

EricLaw -MSFT-
Nice, never know IE would be that secure. Boo to other browsers...
Adrian Godong
NICE but it doesn't solve my problem ....
Mite Mitreski
I've provided the workaround. Either you can use it, or you can wander the Internet, trying to find another solution. Since I've reviewed the WinINET code, I can tell you that such efforts will be fruitless.
EricLaw -MSFT-
yes i know that's why i accepted your answer ...
Mite Mitreski
Interested to know what you think of the approach I've listed below.
Noon Silk
A: 

Why is this by design? What makes www.xx.yy better or more secure than just xx.yy?

You can read the article for a fuller explanation, but the idea is that you may not set a cookie on a "top-level" domain shared by unrelated organizations. Historically, ccTLDs of the format xx.yy were effective TLDs, so cookies may not be set on them.While this heuristic was never perfect, it's been unchanged for over 15 years and hence is not likely to change any time soon.
EricLaw -MSFT-
+1  A: 

Hmm.

So this interested me, and Eric Law is correct, however I have another work around that he does not seem to have listed.

Instead of:

http://aa.mk/

Make your url

http://aa.mk./

Note '.' as suffix.

It will go to the same website, and, as far as I've just tested, you can set cookies on this domain.

I verified in IE6 using the JavaScript cookie-setting code here passing the domain as "aa.mk.".

Noon Silk