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.
That being said, javascript does provide us with several methods to reload the page. I have put several of them together in one function that tests each before using it against the browser's ability to support it. I've ordered them from the most efficient and modern to the least efficient and archaic:
Code:
function doit(){
if (window.location.reload)
window.location.reload( true );
else if (window.location.replace)
window.location.replace(unescape(location.href));
else
window.location.href=unescape(location.href);
}
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.
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.
Bookmarks