Mobile app version of vmapp.org
Login or Join
Murphy175

: Should I use HTTP or HTTPS to reference resources on the Google CDN? All the examples of accessing google's CDN use https:// in the URL (including on Google itself) - but this has caused a

@Murphy175

Posted in: #Google #Javascript #Safari

All the examples of accessing google's CDN use 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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy175

2 Comments

Sorted by latest first Latest Oldest Best

 

@Murray432

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.

10% popularity Vote Up Vote Down


 

@Fox8124981

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 version because it's a safe static file and faster.

good luck

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme