0

I've run into hard to debug problems in development on many occasions because of caching. I want to turn it off somehow. The obvious way seems to be to change the default behavior of my npm start script to open the project in incognito. I've found ways to specify which browser to open, but not how to open in incognito. I'm also fine with any solution that lets me turn off caching when working with projects in development but still have it on by default when browsing.

Supperhero
  • 911
  • 1
  • 7
  • 24
  • What do you use to serve? `express`? If so: https://stackoverflow.com/questions/22632593/how-to-disable-webpage-caching-in-expressjs-nodejs –  Jun 26 '19 at 13:02

2 Answers2

1

In Chrome press F12, choose Network tab and check the box Disable cache.

copperi
  • 355
  • 4
  • 8
0

If you are using webpack-dev-sever, and if you are fine with opening safari in private mode, just have a private window open and then start the dev build with: webpack-dev-server --open 'safari'. It just opens a new private tab. I just tried it in a Mac.

Siri
  • 1,117
  • 6
  • 13