I’m experiencing an issue (which I still need to fix) where my entire page does not load. It gets cut off in the middle of an element.
Is there a way using jquery or javscript to do something like:
if (some element has not loaded yet) {refresh the page}
I was thinking of just putting <div id="end_of_page"></div> at the bottom of the page, and checking if that was rendered, if not, i’ll know something went wrong and can reload to try again.
thanks!!
You can do that, yes. Put this in the head after including jQuery:
You’ll enter the body of the loop (and so, force a reload) if the
end_of_pageelement doesn’t exist as of when the jQueryreadyevent fires (which is meant to be when the page is done loading).But: Better by far to figure out why your page is getting cut off half-way through and solve that. This sort of workaround is not a solution.