A while back I switched a large development project from using cookies to using localStorage. However I've realized that I was a little bit gun-ho and that some of the cookies were actually need on the server.
I have set these back from localStorage to using cookies. However in the interim I have installed IE10 on my Win7 dev box and also switched my development server from IIS Express to ISS 7.5 running locally.
To allow Fiddler to intercept my local traffic I access the development pages through the URL
http://local_iis/
which is identified in the Hosts file as:
local_iis 127.0.0.1
However IE10 fails to set Cookies when accessing pages from this domain with this test page:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
document.cookie = "test=value";
alert(document.cookie); // gives "" in IE 10
</script>
</head>
<body>
</body>
</html>
However running my test page from either of the below sets the cookie (and alerts the value)
http://localhost/
http://127.0.0.1/
The cookie gets set and alerted correctly in both FF and Chrome, as I only ever use IE for development and testing I have changed the security settings down to allow everything in both the Privacy tab, and Local Intranet and Trusted Sites zones under the security tab. I've added local_iis to the trusted sites as well.
Still no cookie being set.
Does anyone know why?