Skip to content

Instantly share code, notes, and snippets.

@boopathi
Forked from paulirish/gist:616412
Created May 22, 2011 09:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boopathi/985312 to your computer and use it in GitHub Desktop.
Save boopathi/985312 to your computer and use it in GitHub Desktop.
"iframe" sitedown fallback via <object>
<!-- so it turns out that the object tag can act like an iframe
but the cool thing is you can nest object tags inside eachother for a fallback path.
what this means is you can "objectframe" a site.. and if it fails.. (site down, offline, whatever).. it'll use the next one.
so you can objectframe the live site and fallback to a screenshot.
or something.
demo at : http://jsfiddle.net/paul/CY2FQ/1/
-->
<object data="http://thisurlwillfail.sohard">
<object data="http://paulirish.com">
<object data="/images/screenshot.png"></object>
</object>
</object>
<!-- this could probably work in IE with some classid bullshit
http://intranation.com/test-cases/object-vs-iframe/
also in this case there can be an ISP that intercepts your failed DNS (which fucks it up) but in most cases a site timeout wont trigger that so it'll be ok. :)
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment