• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2217
  • Last Modified:

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!
0
mrfjacobs
Asked:
mrfjacobs
  • 3
1 Solution
 
jaysolomonCommented:
window.onresize = function() {
      window.location.reload();
}
0
 
jaysolomonCommented:
that goes between the head section

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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now