Some scripts not loading in Chrome - javascript

I have the following script tags (JSFiddle)
<script src="//tags.mediaforge.com/js/1180"></script>
<script src="//s.adroll.com/j/roundtrip.js"></script>
<script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="//connect.facebook.net/en_US/all.js"></script>
<script src="//i.kissmetrics.com/i.js"></script>
The first two don't load. I get the following errors in the Dev Tools console:
And the following appears under "Other" in the Network tab:
And here are the headers for the first one (notice there is no response):
When I open the same page in incognito, it works and the headers are different
I've reproduced this with Chrome 30 and 31.0.1650.57 (both 64-bit) on Ubuntu 12.04. Chrome 31.0.1650.57 m on by Windows 7 VM works fine. I've had some people able to reproduce this and some not.
Any ideas what is going on here?

Related

Amazon Affiliate banner and other product are not showing up on my site in Firefox and edge browser

https://infoaroundtheworld.com in which i have added Amazon Affiliate banner, that is not showing in Firefox, opera and and edge browser for me and my users as well. But in Chrome it is showing.
Please can any one guide my how can fix it.
Thanks
I thought it is because of http protocol script.
so i tried with https protocol as well still not working.
below is the code for my banner.
<script type="text/javascript" language="javascript">
var aax_size='300x250';
var aax_pubname = 'infoaroundthe-21';
var aax_src='302';
</script>
<script type="text/javascript" language="javascript" src="http://c.amazon-adsystem.com/aax2/assoc.js"></script>

LinkedIn Javascript SDK working in Chrome, not Safari

I have the following JS code in my <head> tag:
<script>
function hello() {
alert('blah');
}
</script>
<script type="text/javascript" src="https://platform.linkedin.com/in.js">
onLoad: hello
api_key: xxxxx
</script>
In Chrome (61.0.3163.100), this alert's successfully, but in Safari (11.0 (13604.1.38.1.6)), nothing happens with any console message or anything to go on. Needless to say I am unable to use any SDK functions. I've checked the network inspector and the SDK is indeed being loaded. I have a very high percentage of Safari users so I can't ignore them. Any suggestions?

IE 10 Cache issue?

I have a very simple page that is loading 4 scripts.
jquery 2.0.3
jquery ui 1.10.3
knockout 3.0.0
knockout mapping 2.4.1
This only happens in IE. I have tried it in both 10 & 11;
I navigate to the url and the page loads fine. if I refresh the page still OK. If I go to the hit Enter in the address bar expecting it reload, it does but I get SCRIPT70: Permission denied errors, saying permission denied. Any ideas? Is this a local security settings policy with IE?
Here is the markup:
<html>
<head></head>
<body>TEST
<script src="/MyVirtualDir/Scripts/jquery-2.0.3.min.js"></script>
<script src="/MyVirtualDir/Scripts/jquery-ui-1.10.3.custom.min.js"></script>
<script src="/MyVirtualDir/Scripts/knockout-3.0.0.js"></script>
<script src="/MyVirtualDir/Scripts/knockout.mapping-2.4.1.js"></script>
</body>
</html>
I am not sure if this will help but this worked for me in IE10
Here's something to try:
Make sure that HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_OBJECT_CACHING\iexplore.exe is not set to 0 (it should be 1 or missing)
Reference: http://forum.jquery.com/topic/strange-behaviour-in-ie9
I don't think it has anything to do with jquery/js
Or Try this: Tools>Internet Options>Security tab, click "Reset all zones to default"

External JavaScript Files will not execute in IE9

The following is a snippit from my a little web page I'm putting together.
<script type="text/javascript" src="head.js">
</script>
<title>CPST 3410-85 Class Template</title>
</head>
<body onload="outputToDiv();">
The head.js file referenced in the script tag is below:
function outputToDiv() {
alert("JavaScript is working!");
}
In Chrome and in Firefox the alert is displayed indicating the JavaScript is working. In IE9 it is not. Furtermore I can't get ANY external script to run in IE9, regardless of the content. I have used custom security settings and lowered in a granular way every security setting to its lowest level, and gone into advanced settings and enabled literally everything I could find.
It should be noted that I am opening this from a local folder. All files are in the same folder, and again I stress that this works in firefox and chrome.
In IE9 I have enabled debugging and I get the error below:
Webpage error details
Message: Invalid character
Line: 1
Char: 1
Code: 0
URI: file:///E:/My%20Documents/My%20Web%20Sites/CPST341085/head.js
Of course it then tells me that "outputToDiv()" is undefined.
I am at a total loss here.
I got this behavior when I had:
<script type="text/javascript" src="jquery-1.7.1.js" />
However, this fixed it:
<script type="text/javascript" src="jquery-1.7.1.js"></script>
Go figure...
David

(YUI2 javascript) - JavaScript does not work inside yui dialog

I try to insert JavaScript code to YAHOO.widget.Dialog.setBody(...), bit this does not work in Chrome (I have Ubuntu) (In Firefox the code is working)
The html file (simple example that not working in chrome browser):
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.2r1/build/container/assets/skins/sam/container.css">
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.2r1/build/yahoo-dom-event/yahoo-dom-event.js&2.8.2r1/build/container/container-min.js"></script>
</head>
<body class="yui-skin-sam">
<script type="text/javascript">
previewDialog = new YAHOO.widget.Dialog("previewDialog", { width: "600px", visible: true});
previewDialog.setBody('<h2>h2 text h2'+'<script>'+'alert("alert text alert");'+'<'+'/script>'+'</h2>');
previewDialog.render(document.body);
</script>
</body>
</html>
How can be my code fixed for working in chrome?
(In real project I try to insert more complicated javascript code)
I don't have a solution, but I am having the same problem.
I opened up Google Chrome's built in developer console and see several warnings:
[blocked] The page at https://c.na15.visual.force.com/apex/SkillsMatrix?core.apexpages.devmode.url=1 ran insecure content from http://yui.yahooapis.com/combo?2.7.0/build/yahoo-dom-event/yahoo-dom-event.….0/build/animation/animation-min.js&2.7.0/build/container/container-min.js.
SkillsMatrix?core.apexpages.devmode.url=1:1
[blocked] The page at https://c.na15.visual.force.com/apex/SkillsMatrix?core.apexpages.devmode.url=1 ran insecure content from http://yui.yahooapis.com/combo?2.7.0/build/container/assets/skins/sam/container.css.
SkillsMatrix?core.apexpages.devmode.url=1:3
[blocked] The page at https://c.na15.visual.force.com/apex/SkillsMatrix?core.apexpages.devmode.url=1 ran insecure content from http://yui.yahooapis.com/combo?2.7.0/build/yahoo-dom-event/yahoo-dom-event.….0/build/animation/animation-min.js&2.7.0/build/container/container-min.js.
SkillsMatrix:1
[blocked] The page at https://c.na15.visual.force.com/apex/SkillsMatrix?core.apexpages.devmode.url=1 ran insecure content from http://yui.yahooapis.com/combo?2.7.0/build/container/assets/skins/sam/container.css.
I think the problem (at least for me) is that Chrome is most vigilantly enforcing a "Same Origin Policy" (cf. http://en.wikipedia.org/wiki/Same_origin_policy ).
The Force Times ( http://theforcetimes.wordpress.com/ ) currently writes about using an "AJAX Proxy" which may help to resolve some such issues. (His article is SFDC-centric but perhaps the principle will help if this is the problem you are having and you can establish your own proxy somewhere.)
It requires additional button-min.js and element-min.js with corresponding CSS as well.

Categories

Resources