nocache. Don't waste your time reinventing the wheel, use the nocache middleware instead. It has been here for 9 years (2024) and it is downloaded more than 2 million times per week. Having only 140 stars on github, this is actually one of those unsung heroes of the express ecosystem. Install it npm install --save nocache Add it to you app: