Description, source and work arounds that may shed light on the problem: http://durge.roswellpark.org/ie7Bugs/
I think it has to do with the fact that IIS does not report content-length header on pages served as PHP. If I manually create my own content-length header it works. This problem did not happen in IE 6 and will affect all php sites served from IIS 6 to IE 7 that use sessions.
Here is an example
< php
session_start();
><html>
<head>
<script type="text/javascript" src="javascript.js"></script>
<title>IE 7 false content-length - refresh bug demo</title>
</head>
<body>
<h1>IE 7 Content-Length Bugs</h1>
<p>This will not show up on refresh when served from IIS 6 with PHP 5.1.6 to IE 7.</p>
</body>
</html>