Refresh page on browser window resize

I'd like to make a javascript which refreshes the page on browser window resize. I'm just wondering how I capture the browsers resize event?

Thanks in advance!
mrfjacobsAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
jaysolomonConnect With a Mentor Commented:
that goes between the head section

<head>
<script>
window.onresize = function() {
     window.location.reload();
}
</script>
</head>
0
 
jaysolomonCommented:
window.onresize = function() {
      window.location.reload();
}
0
 
mrfjacobsAuthor Commented:
great! works perfectly :)
0
 
jaysolomonCommented:
Glad to have helped and thanks for the  A
jAy
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.