Briefly, I have created a server using nodeJS. I have installed 'morgan' for the logger. When I render my front-end everything works, my website can be accessed, RU (registered users) can book, ... However the main problem is that I am getting 304 statusCodes in my terminal.
is the problem even fixed in the backend or is the problem related to the browser (using chrome btw)? How can I solve this problem to get 200 statusCode?
if everything is working, then I should have received 200 statusCode. I have looked a lot and still haven't found a solution that works. There is a question around this in stack over flow which dates back years ago (NodeJS/express: Cache and 304 status code). The answer(s) given which is app.disable('etag'); (or the updated version: app.set('etag', false);) or using app.router which is now deprecated does not work for me.
Also when I clear cache from my browser and run my server again, I get 200 statusCode for the first time but then the second time (onwards) when nothing is changed and I refresh, I get 304 for the statusCode.
Thanks in advance.