अवलोकन
window.location.protocol प्रॉपर्टी वर्तमान पेज का प्रोटोकॉल (http: या https:) लौटाती है।
उदाहरण
<!DOCTYPE html> <html> <body> <script> document.write("https or https: <br>The protocol is:"+window.location.protocol); </script> </body> </html>