JavaScript -Test https

// force https connection
if (location.protocol !== 'https:') {
    location.replace(`https:${location.href.substring(location.protocol.length)}`);
}
Abs Zarzis