http-server icon indicating copy to clipboard operation
http-server copied to clipboard

Disable Caching

Open nickeb96 opened this issue 6 months ago • 0 comments

Description

It would be very helpful if there was a way to disable caching.

Why is this useful?

Currently, if the files you're serving change, you need to either kill and restart the command, or open up your browsers dev tools window and temporarily disable cacheing in the options.

The node package http-server allows you to modify caching defaults with a -c flag. The lack of cache options is the only thing stoping me from switching to this http server command.

How should this work?

I think the simplest way to implement this would be to add a cli flag and a config value for shortening the cache time or disabling it altogether.

nickeb96 avatar Jul 16 '25 20:07 nickeb96