Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernizr Google Analytics warning in Chrome #720

Closed
og-shawn-crigger opened this issue Aug 24, 2011 · 8 comments
Closed

Modernizr Google Analytics warning in Chrome #720

og-shawn-crigger opened this issue Aug 24, 2011 · 8 comments
Assignees

Comments

@og-shawn-crigger
Copy link

I've been noticing this warning in the console ever since I switched to using 2.0.

Only Effects Chromium and Possibly Safari ( haven't had a chance to check it in Safari yet, forgot the command to turn on the dev tools for Safari in Lion )

Resource interpreted as Image but transferred with MIME type text/javascript. => ga.js:-1

I believe it's a issue with the current Modernizer Packaged with the Boilerplate Download, will build a custom Modernizer and see if I get the same warning and respond back later.

Shawn Crigger
@svizion

@mathiasbynens
Copy link
Member

I don’t see this warning on http://demo.html5boilerplate.com/ (Chrome 13.0.782.215, OS X Lion). Which Chrome version are you testing in?

@necolas
Copy link
Member

necolas commented Aug 24, 2011

That's strange. I'm seeing this on my local server but not at the demo site.

PS When we get to the bottom of this we should also update the GA loading in elements.html demo file to match index.html

@mathiasbynens
Copy link
Member

It’s probably because yepnope/Modernizr.load uses img elements to load scripts and execute a callback when the loading has finished in modern WebKit browsers: https://github.com/SlexAxton/yepnope.js/blob/master/yepnope.js#L36 Still kinda weird it only errors locally though.

@svizion You could switch back to the plain vanilla optimized Google Analytics snippet instead to avoid the issue.

(I personally still think it should be the default, since it has no dependencies.)

@og-shawn-crigger
Copy link
Author

I personally use the Chromium nightly builds for Debian, Lion and Snow Leopard depending on what computer I'm using. ( Still can't get the app store to work on my Hackintosh Build so I haven't updated my second Mac to Lion yet )

I guess the warning really doesn't hurt anything, I was just curious about it. Thanks for your information on the yepnode issue now it makes sense to make me.

Once again, thanks for the awesome work on the boilerplate the amount of information I have learned just by reading all the comments and links in it is amazing.

@JasonGiedymin
Copy link

I've run into this issue, however recently scripts have been prevented from running.

Since boilerplate uses modernizer, which in turn includes yepnope for resource loading, here is the issue over at the yepnope repo:
SlexAxton/yepnope.js#32

"This is intended because we images to preload resources certain versions of webkit in yepnope."

This feels like a 'loop hole' and firmly believe this shouldn't exist in something like html5-boilerplate. Chrome should be satisfied and not flag resources which are being loaded in a round about manner.

@necolas
Copy link
Member

necolas commented Aug 25, 2011

Pretty sure we're going to revert to the previous GA snippet to avoid the dependency on Modernizr.

@ghost ghost assigned mathiasbynens Aug 25, 2011
@JasonGiedymin
Copy link

Great! That really gives me a lot of faith that html5-boilerplate will continue to be stable and well run/liked in browsers.

@mathiasbynens
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants