ssApplyPatternsWhenReady improves on ssApplyPatternsIfReady by running it repeatedly at intervals of 100 milliseconds until the request has completed, or a time limit expires.
If it takes a while, it provides feedback to the user - it warns them after 10 seconds, and tells them it is giving up after 20 seconds.
One optional improvement is provided by ‘single threading’ the Ajax request, as illustrated in Single Threaded Ajax.