Usually it is possible and always is better to design your page and plan out whatever it needs to do without having to refresh it after it is loaded. This can have predictably bad consequences for forms and unexpectedly bad consequences in other areas of sever-side code.
This is by no means meant to be exhaustive but, will probably handle the vast majority of browsers out there without resorting to any sort of browser testing.
window.location.reload( true );
else if (window.location.replace)
You probably also need a hook to execute the doit() function on but, I'm unclear as to what sort of condition(s) and/or circumstance(s) you would want to trigger this. If things like onresize, onload, etc. won't do (and these type of events have special considerations) then either a poll (last resort) or a hook into an existing bit of code (generally best) would suit. The way a poll works is to periodically test if a certain condition or set of conditions is true and then execute something if they are but, it can take up a lot of resources in many cases.