ask-sheldon.com
Get current protocol from URL (http or https) - Bravehartk2's Blog
To get the protocol used for the current page: var protocol = window.location.protocol
Sheldon