Detect secure. Use protocol when no JS