1var ww = window.innerWidth, limit = 1025;
2var refresh = function() {
3 ww = window.innerWidth;
4 var w = ww < limit ? (location.reload(true)) : ( ww > limit ? (location.reload(true)) : ww=limit );
5}
6var tOut;
7window.onresize = function() {
8 var resW = window.innerWidth;
9 clearTimeout(tOut);
10 if ( (ww > limit && resW < limit) || (ww < limit && resW > limit) ) {
11 tOut = setTimeout(refresh, 100);
12 }
13};