jQuery integration has been one of my most highly anticipated features of v11, so it was the first thing I started working on when I loaded alpha 11 yesterday. I went to the settings, turned on Load from Google's CDN, republished all my files and looked in the source of my pages. Lo and behold!
That's a great start. But on my SSL enabled site, I get an error about my page: "This page has insecure items: Load Anyways?" (Chrome). A trick I learned a few months ago is to drop the http: in front of the URL. This effectively turns your request into the same type as the page your are on. So if you are on a http connection it would use http://etc..... If you are on a https connection, it would use https://etc.....
It's called a protocol relative url, and is actually effective for more than just this one case.
SOURCE: http://paulirish.com/2010/the-protocol-relative-url/
Code:
[FONT=monospace]<[/FONT][FONT=monospace]script[/FONT][FONT=monospace] src[/FONT][FONT=monospace]="[/FONT][URL="http://msgboard.alphasoftware.com/alphaforum/view-source:http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"]http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js[/URL][FONT=monospace]" [/FONT][FONT=monospace]type[/FONT][FONT=monospace]=[/FONT][FONT=monospace]"text/javascript"[/FONT][FONT=monospace]></[/FONT][FONT=monospace]script[/FONT][FONT=monospace]>[/FONT] <script src="[URL="http://msgboard.alphasoftware.com/alphaforum/view-source:http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"]http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js[/URL]" type="text/javascript"></script> <script> if(typeof jQuery != 'undefined') jQuery.noConflict();</script>
Code:
[FONT=courier new]<script src="[URL="http://msgboard.alphasoftware.com/alphaforum/view-source:http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"]//ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js[/URL]"></script> <script src="[URL="http://msgboard.alphasoftware.com/alphaforum/view-source:http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"]//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js[/URL]"></script>[/FONT]
SOURCE: http://paulirish.com/2010/the-protocol-relative-url/
Comment