Userfull wor working on sites that supports switching to https
When working with sites that supports switching to https, you need to be aware that external references also is reachable by https, and that you actualy references the resources by https, when you own site is in https mode.
On way to do it is to check wheather the user currently is in https mode, and set the references accordingly, the best practice way to do is to use protocol independent slashes.
En example would be if you are using jQuery of a CDN, i.e. Googles. You would reference your jQuery library like this:
Whenever you notise that the user is in https mode, you switch the reference to https like this:
The switch will make you write som extra lines of code, one to do the https check, and another one to actualy do the switch. In Sitecore this ca be done faily easy be using xslt's for the references, but the easiest implementation is to use the protocol independent slashes. They would work by removing the http: or https: infront of the reference, leaving the reference looking like this:
It tells the browser that it should use the prococol that you are currently using, this means that itll get the reference by http when in normal mode, and by https when in a secure mode.
The easy solution is to just reference the https version of the reference all of the time, but there is a performance penalty when you get https, because the connection will be encrypted, by using the slashes, you only get the encrypted connection, when needed.