The problem is all the links in the site should remain secure, I am calling relative url's but between the browser and Javascript there is a bug that means the address that gets past to the server running the URL is an http session and not the https session it should be.