• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
JavaScriptSource

JavaScriptSource

Search 5,000+ Free JavaScript Snippets

  • Home
  • Browse Snippets
    • Addon
    • Ajax
    • Buttons
    • Cookies
    • CSS
    • Featured
    • Forms
    • Games
    • Generators
    • Image Effects
    • Math Related
    • Miscellaneous
    • Multimedia
    • Navigation
    • Page Details
    • Passwords
    • Text Effects
    • Time & Date
    • User Details
Home / Page Details / Reload on Resize

Reload on Resize

Reload on Resize

Useful for situations when a page resize moves the page elements improperly or causes JavaScript errors, which has been known to occasionally occur on pages with layers. As a solution, this script reloads the web page when the user resizes the page.


If you resize this page, it is reloaded. Try it!

<!– ONE STEP TO INSTALL RELOAD ON RESIZE:

  1.  Add the onLoad event handler into the BODY tag  –>

<!– STEP ONE: Insert the onLoad event handler into your BODY tag  –>

<BODY onResize=”window.location.href = window.location.href;”>

<p></p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br />
by The JavaScript Source
</font></center><p>

Page Details

Related Snippets:

  • Get all URL parameters from a query string
  • Notify when element size is changed
  • Top Window
  • Copyright Notice

Primary Sidebar

FREE UPDATES!

Get the latest updates in your inbox for FREE!

Popular Posts

Story Generator

IP Grabber – get a users IP address with JavaScript

Simple Calendar

Remove Ads

Astrological Calculator

Copyright © 2023 JavaScriptSource.com

  • About
  • Privacy Policy
  • Submit
  • FAQ
  • Jobs For Developers
  • Contact Us