# browser-reload

> Reload web pages on change

Latest version **1.1.0** (published 2015-09-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install browser-reload
pnpm add browser-reload
yarn add browser-reload
bun add browser-reload
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2015-09-12 |
| First published | 2013-05-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Maximilian Antoni |
| Maintainers | mantoni |

## Links

- npm: https://www.npmjs.com/package/browser-reload
- Repository: https://github.com/mantoni/browser-reload
- Issues: https://github.com/mantoni/browser-reload/issues
- npm.io page: https://npm.io/package/browser-reload

## Recent versions

- 1.1.0 (latest) — 2015-09-12
- 1.0.1 — 2013-12-01
- 1.0.0 — 2013-05-10

## README

# 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


[Consolify]: https://github.com/mantoni/consolify

---
_Source: https://npm.io/package/browser-reload · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
