Nov 03 2010 Published by under MediaCreeper

I just figured out how to add some fault-protection, as sort of fallback, if loading of the badge would fail. By adding onerror="this.src='http://mediacreeper.se/image';" to the badge-code which is pasted into pages it makes the badge a little more fault-resilient.

I know, the onerror event isn’t supported everywhere but Firefox and for all I know, MSIE supports it. It breaks validation of XHTML 1.0 Strict.


2 responses so far

  • Seppo says:

    This fallback causes an infinite loop (and high CPU usage) in Firefox with the RequestPolicy add-on installed and when cross-site requests to mediacreeper are not allowed.

    Only way to “fix” this error is to either disable JavaScript on each site using mediacreeper (which most times would break the site) or to allow cross-site requests to mediacreeper (which I don’t want to do.)

    So right now I’m going to add mediacreeper.com into my hosts file with IP or and then allow the domain in RequestPolicy, so that the inline onerror won’t trigger infinitely. I’m fed up with the thousands of errors in my logs.

  • Good post. I study one thing tougher on different blogs everyday. It would all the time be stimulating to learn content from different writers and practice just a little something from their store. Ifavor to make use of some with the content material on my weblog whether or not you don’t mind. Natually I’ll offer you a hyperlink in your web blog. Thanks for sharing.

Leave a Reply