I run several widgets on my site, and lately one of them has been causing severe load time due to server issues. As a result it can take my site minutes to finish loading. I can't drop the widget since it's actually making me money, but is there a way I can force it to timeout after x amount of seconds?
In addition, is there a way I can apply this timeout limit to ALL the widgets, not just the troublemaking ones, so i can ensure my site will always load within a reasonable amount of time?
I was thinking of using iFrames but unfortunately due to how my site is rendered it's not a possibility. :-(
Make sure you put your script at the end of the page, right before your closing </body>. When the browser processes the script, it will block your content from being downloaded. So if you put your CSS as early as possible in your <head> and your scripts as late as possible, then your content should still be accessible to users.
That goes without saying for me, but sometimes if you're using sidebar widgets it's not possible. One way to address this issue was to simply badger the widget owners to shorten the timeout period for their widget until their ears bleed and they comply just to get rid of you. :-)