Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
var url = $(location).attr('href');
var protocol = $(location).attr('protocol');
alert(url);
if (protocol == "http:") {
alert("http");
} else {
alert("https");
}
});
</script>
</head>
<body>
</body>
</html>
The most helpful JQUERY solutions