JavaScript Cara Mengetahui Jika Situs Aman

if (location.protocol === 'https:') {
    // page is secure
}
DCmax1k