3

All the examples of accessing google's CDN use https:// in the URL (including on Google itself) - but this has caused a problem when testing in Safari (certificate problem and also different domain).

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

I have switched to calling it over http instead, but just wondering if this is a mistake or security issue?

danlefree
  • 12,888
  • 4
  • 43
  • 60
HorusKol
  • 211
  • 1
  • 12

2 Answers2

4

You should probably just use src="//ajax.googleapis.com/..." which is a good way to allow this to work in both http and https pages.

Serving http assets in a page served via https will raise warnings in most browsers, while serving https assets in http pages usually is okay but might be "slower" because of the cryptology overhead.

Evgeny Zislis
  • 1,402
  • 1
  • 15
  • 26
0

You will see errors and warnings when you are including "unsecure" items on a secure page. (Vice versa) This is not a mistake or accident. It is for security reasons.

You should use the http:// version because it's a safe static file and faster.

good luck

andrewk
  • 499
  • 2
  • 9