Roots Discourse

How to Stop Bowsersync Caching HTML?

browsersync

#1

I’ve been using Sage 8.5.0 for a while and browsersync has worked well. Recently I’ve found that despite the browser reloading when watching file (php) changes nothing changes. If I refresh the proxy which is I run using mysite.dev I see the changes. I use Chrome and Inspect is open and caching disabled. I’ve tried switching ports but with no success. It does show style changes which are streamed.

gulp.task('watch', function() {
  browserSync.init({
    files: ['{lib,templates}/**/*.php', '*.php'],
    proxy: config.devUrl,
    snippetOptions: {
      whitelist: ['/wp-admin/admin-ajax.php'],
      blacklist: ['/wp-admin/**']
    },
    logLevel: "debug"
  });
  gulp.watch([path.source + 'styles/**/*'], ['styles']);
  gulp.watch([path.source + 'scripts/**/*'], ['jshint', 'scripts']);
  gulp.watch([path.source + 'fonts/**/*'], ['fonts']);
  gulp.watch([path.source + 'images/**/*'], ['images']);
  gulp.watch([path.source + 'images/svg_icons/*.svg'], ['svgstore']);
  gulp.watch(['bower.json', 'assets/manifest.json'], ['build']);
});