Socket
Socket
Sign inDemoInstall

browser-reload

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-reload

Reload web pages on change


Version published
Weekly downloads
522
decreased by-45.96%
Maintainers
1
Weekly downloads
 
Created
Source

Automatic Browser Reloads

Automatically reloads web pages when changed. No server side logic required. Works fine with Apache.

Usage

Put this anywhere in your HTML file:

<script src="reload.min.js"></script>

The minified source is a single line. You may also embed the source directly.

NOTE: This is a development tool. Remove the script before deployment.

How it works

Does HEAD requests with AJAX polling every second. If the Last-Modified header is greater than the page load timestamp it does a location.reload().

The host MUST be localhost or else the script will not send any requests. This means the page containing the script has to be served by a web server.

Why a Node package?

This script is used by Consolify which turns your browser window into a console and runs Node modules via Browserify.

License

MIT

FAQs

Package last updated on 12 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc