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 ?