javascriptgruntjslivereload

Reload JS/CSS files on change without page reloading


I'm using Livereload for Grunt.js to reload web-page after any of watching files are being changed.

Is it possible to delete changed js or css file from the cache and reload only them, NOT reloading the whole html-page?

This question seems to be asked right but with no right answer. How to update file in browser cache after it is updated? Thanks.


Solution

  • You can do it only for CSS files, using grunt-browser-sync.

    This plugins allows to reload only the CSS modified file.

    Here is the documentation.