What is hot-reloading exactly, is it just another fancy term for live-reloading?

View other answers to this thread
Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown · Publish articles on custom domain · Gain readership on day zero · Automatic GitHub backup and more

Sunny Singh's photo

You can consider it the same but the big difference is that it will reload parts of your code on-the-fly without reloading the entire page. This is extremely useful when you want to maintain the current state of your page (e.g. filled form inputs) while making UI updates. This way you don't have to refill a form or do some action over and over again after updating your code. Hot reloading is also capable of updating actionable code without reloading the page, such as the function for when a button is clicked.

With that said, I've noticed that Browsersync can actually hot-reload CSS now, so "live-reloading" tools like that seem to be integrating similar functionality. However, I don't think it can hot-reload HTML or JavaScript unless you're using it alongside Webpack or Browserify (correct me if I'm wrong on that).

Dex's photo

BrowserSync can inject HTML without a page refresh through the use of a plugin: https://github.com/shakyShane/html-injector