views:

116

answers:

2

I am using IE8 with a Intranet app in Local Intranet zone and find that it refuses to load the Google CDN hosted jQuery! Is there some setting I need to change?

Hovering my mouse over the Lock icon at the bottom right of the window shows a tooltip "No items are being blocked on this page".

Help? Thanks

+6  A: 

Presumably, the "Local Intranet" zone doesn't permit script files from outside the zone.

This may be one of the situations in which it makes more sense to just host jQuery locally - after all, an intranet is (hopefully!) the one situation in which hosting it yourself is likely to be faster than letting Google handle it.

ceejayoz
I didn't see any setting in the Local Intranet zone to allow/deny script files from outside the zone. Can you point me to it? Using the CDN is attractive because they keep the versions up-to-date and stuff.
VANJ
Keeping them up to date requires about 30 seconds of work every few months. In other words, you've spent more time trying to fix the issue than it'll take to keep a local copy of jQuery updated for the next half-decade or so.
ceejayoz
A: 

If the above answer does not apply, and you're using CDN loading jQuery via the Google AJAX Libraries API, ensure you've included the Google AJAX API script below:

<script src="http://www.google.com/jsapi"&gt;&lt;/script&gt;

You can then select the library you wish to load using the google.load() method, defining the library and version. Also ensure you replace jQuery's ready function with google.setOnLoadCallback(), example below:

<script>
google.load("jquery", "1.3.2");
    google.setOnLoadCallback(function(){
        alert('This works!');
    });
</script>
BenTheDesigner
This works fine! But now I am confused. In both the cases, the browser executes methods from remotely loaded scripts.Why does this work and directly linking to the library doesn't?
VANJ
Have you tried opening the script URL in a browser? There's a chance it could be incorrect. The direct path should be http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js - Note that if for some reason you are using jQuery 1.2.4 or 1.2.5 they are not hosted.
BenTheDesigner