Encode URL through JavaScript

HTTP vs HTTPS