To make it refresh given an interval, use setTimeout() to call your function with a specified delay:
setTimeout("document.location = document.location; document.refresh()", 2000);
To make it refresh once, you could try using cookies to store session data. E.g. cookie with 5 minute expiration time in it set onload. Also in onload checks for existance of cookie. If not found, set cookie and refresh.