Categories
discuss

Why not always use https when including a js file?

For what reasons do sites provide logic to switch between http/https protocols for JavaScript include files? Why not always use https?

For what reasons do sites provide logic to switch between http/https protocols for JavaScript include files? Why not always use https?

Answer

HTTPS means :

  • You need a server configured properly
  • You need a certificate on your server
    • And, to not get a warning in the browser, you need a certificate signed by some trusted authority
    • And this costs a bit of money
  • A small bit of performance impact
    • The server has to crypt the data
    • The client has to de-crypt it
  • I would bet HTTPS means less caching
    • Maybe on the client side ?
    • And, most probably, on proxies ?

If you don’t need HTTPS… Well, why use it ?

Source: stackoverflow
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Privacy Policy, and Copyright Policy. Content is available under CC BY-SA 3.0 unless otherwise noted. The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 © No Copyrights, All Questions are retrived from public domain..