check if window is reload javascript code example Example: refresh window js window.location.reload();