So you do
var window = top.location;
and what are you
window.top.location.reload();
So you really say
top.location.top.location.reload();
Why are you using the named window variable if it is already defined and has a different value? This is bad.
If you use frames, I expect to see something like
parent.location.reload(true);
or just an ordinary old window
window.location.reload(true);
source share