OK, so we have a pretty straightforward rule. Providing no further input to the program once it begins,
1) If execution terminates by some timeout T, where T is at least several seconds, then index that.
2) If execution has not yet terminated by T, whether or not we have any idea whether it will terminate in the future, don't index.
Tune T so that it will get the vast majority of reasonable web pages. (Hypothesize, and test, T = 5 seconds or 30 seconds or something. Have a human look at the highest-PageRanked timeouts to figure out what's going on.)
This applies whether "the program" is server-side or client-side. The halting problem cannot be reduced to the timeout problem (since the halting problem asks if it ever terminates), and the timeout problem is pretty clearly computable.