Developers

Auto reload localhost while you code.

Build tools with live reload are great when you have them. When you do not, such as a plain page, a server-rendered template or a quick prototype, a timer in the browser does the job.

Al Kafi SohagNov 19, 20262 min read
Previewing a local site
Edit, save, glance

When a timer is enough

Frameworks like Vite and Next.js reload for you. A timer helps where there is no such tool: a static HTML page, a PHP or template page, an email template preview, or a CMS theme. It is also handy for a second screen that shows the page while you edit in your editor.

The setup

  1. Open your local address, for example http://localhost:3000.
  2. Open Free Auto Refresh and set 3 to 5 seconds in Min and Max.
  3. Turn on hard reload so the browser skips cached CSS and scripts.
  4. Turn on Keep scroll position so a long page stays where you were.
  5. Press Start.

Avoid the cache trap

The most common reason a change does not show is a cached file. Hard reload asks the server for fresh copies each time. If the old version still shows, open DevTools and tick Disable cache in the Network tab as well. See Empty Cache and Hard Reload.

Do not lose form input

If you test forms, turn on Smart pause. The timer holds while you type in a field, so a reload does not clear what you entered.

Be honest about the trade-off

A timer reloads on a schedule, not when a file is saved, so there is a short delay and extra reloads. If your tool offers live reload or hot module replacement, that is the better choice.

Good to know

Questions, answered.

Does it work on localhost?

Yes. It runs on any page you open in Chrome, including local development addresses.

Is it better than live reload?

No. Live reload is faster and exact. A timer is for pages that have no live reload.

Will it keep the page from caching my CSS?

With hard reload on, each reload asks the server for fresh files.

Less checking. More doing.

Skip the manual reloads.

Free Auto Refresh does it on a timer, for Chrome and Firefox.

Free foreverPrivate by designOpen source

More from the blog

All posts