drupal module secure pages toggles between http and https on reload
The source of the problem could be in several places, depending on which webserver you're using, how it's configured, etc.

Are you using Apache with mod_ssl?  NOthing else 'in front', like nginx doing the SSL handshaking instead?

In any case, I'm guessing that your webserver's not consistenly serving up the required server var.  In 'securepages.module', there's a check for

return (isset($_SERVER['HTTPS']) &amp;&amp; $_SERVER['HTTPS'] == 'on') ? TRUE : FALSE;


Not knowing your webserver config, find out what your webserver is doing.  add,

&lt;?php
 phpinfo();
?&gt;


to your pages and look to see what the values of

$_SERVER['HTTPS']
$_SERVER[SERVER_PORT]


are.  Or simply print them out directly ...  Check if/how those values toggle on page refresh.

I'm suspicious of caching, too.