Timeout a Script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Melissa Nieves
    New Member
    • Feb 2012
    • 1

    Timeout a Script

    How would I stop the loading of a script if it is taking too long? My site references an external websites javascript and since their site was having problems processing the scripts, my site wouldn't complete loading the rest of the page. I would like to be able to give it a time limit to load and then scrap the script if it reaches the limit.

    Thanks in advance for your help!
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    you might load the external content through an AJAX call - but this would need to involve a Cross Domain Proxy due to the Same Origin Policy for JavaScript

    Comment

    Working...