title: Any way to gracefully enforce a timeout limit when loading a slow external file via javascript?
body: <p>I'm using javascript to include some content served up from a php file on another server.  However, this other service can sometimes get flaky and either take a long time to load or will not load at all.</p>
  
  <p>Is there a way in JS to try to get the external data for x number of seconds before failing and displaying a "please try again" message?</p>
  
  <pre><code>&lt;script type="text/javascript" src="htp://otherserver.com/myscript.php"&gt;&lt;/script&gt;
  </code></pre>