126
rated 0 times
[
132]
[
6]
/ answers: 1 / hits: 39050
/ 14 Years ago, tue, may 18, 2010, 12:00:00
I am trying to find how can I detect with JavaScript if I am in a HTTP or HTTPS environment.
I am calling an Ajax request so if I am in HTTPS and call HTTP Ajax then I get a 302 Moved Temporarily.
I was thinking of getting the current window.location.href
and do a string manipulation.
What is the best way of detecting HTTPS using JavaScript?
More From » https