When you have video or audio that is not playing back correctly, it can be helpful to check out chrome://media-internals/ which is documented at https://www.chromium.org/audio-video/media-internals
This can give you some information on the playback including errors that may have occurred.
Sometimes you don’t have access to scripts you are trying to debug. Using the chrome extension flip the script makes it really easy to serve up local versions of files in place of the remote requests.
It’s super easy to setup so what are you waiting for?!
If you don’t use Sublime Text, find a jshint plugin for your editor over at http://www.jshint.com/install/
Are you using JSONP and jQuery and trying to handle non 200 responses? Getting frustrated that your error handler isn’t firing when it gets a 403, 404, or some other response code? Take a breath and repeat after me.
“There is no error handling in JSONP”
Now that you have fallen into a great despair, let me save you.
Head over to https://github.com/jaubourg/jquery-jsonp to find a good alternative to jQuery’s implementation of JSONP.
The solution was easy to implement and helped me solve the issues I was having with getting 403 and 404 errors on JSONP requests.
jQuery-JSONP is feature rich with
- error recovery in case of network failure or ill-formed JSON responses,
- precise control over callback naming and how it is transmitted in the URL,
- multiple requests with the same callback name running concurrently,
- two caching mechanisms (browser-based and page based),
- the possibility to manually abort the request just like any other AJAX request,
- a timeout mechanism.
and compatible with all major browsers
- Internet Explorer 6+
- Firefox 2+
- Chrome 1+
- Safari 3+
- Opera 9+
Photo by janet galore