Next.js Discord

Discord Forum

status 304 only in production

Unanswered
Broad-snouted Caiman posted this in #help-forum
Open in Discord
Avatar
Broad-snouted CaimanOP
I have an api endpoint /api/users that fetches all users. Im showing all these users in clientside. In development it works fine, it always returns status code 200 (im not using caching), so when i add a new user and refresh the page, it shows me the new user. But on production, it only returns status code 200 for the first time, then it always returns status code 304 (not modified), so when i add a new user, it doesnt show. Any fix?

0 Replies