Questions tagged [http-status-code-304]

The HTTP response status code 304 Not Modified

Indicates the resource has not been modified since last requested. Typically, the HTTP client provides a header like the If-Modified-Since header to provide a time against which to compare. Using this saves bandwidth and reprocessing on both the server and client, as only the header data must be sent and received in comparison to the entirety of the page being re-processed by the server, then sent again using more bandwidth of the server and client.

Related tags

See also RFC2616.

181 questions
1
vote
2 answers

mod_deflate on apache causing browser to do a 200 instead of 304?

I enabled mod_deflate on Apache 2 on an Ubuntu machine and noticed that my browser doesn't cache the compressed file types on page refreshes. I used firebug's net settings to check this and verified on another computer. Under mod_deflate if I…
Avichal
1
vote
0 answers

Expires and 304 not modified request

Why when i was setting Expires and disabled Etags, I still getting 304 response? This is my .htaccess file: Header unset Pragma FileETag None Header unset ETag #Expire Header Header set Cache-Control…
1
vote
0 answers

Browser is displaying no-cache version of page after receiving HTTP 304

It happens in my Wordpress and nginx configuration but IMO it's browser/HTTP related problem. Everything is about one page, that appears in two versions, for logged in user and anonymous user. Scenario: Wordpress is serving user page that should be…
Tuner
  • 69
  • 7
1
vote
3 answers

How to prevent the server from replying with 304?

I need to know the steps that I can do to prevent the server from replying with 304.
Muhammad Hewedy
  • 29,102
  • 44
  • 127
  • 219
1
vote
0 answers

Spring WebClient: How to handle NOT_MODIFIED (304) responses with caching or else?

i'm a little stuck how to handle "NOT-MODIFIED" answers from a remote resource. Using Spring WebClient i fetch a remote resource (json) and want to prevent unneeded calls or better: working with conditional requests. Details: Spring Boot 3 MVC…
1
vote
0 answers

How to 'solve' 304 statusCode in nodeJS?

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…
1
vote
1 answer

304 ERR_BLOCKED_BY_RESPONSE for web worker file after enabling same-origin CORS to allow SharedArrayBuffer

I'm looking to do some multithreading for my web application to improve performance and I've stumbled upon a head-scratcher. I'm currently developing on localhost (vite server) on Chrome. Basically I have spawned a web worker. Then I created a…
1
vote
1 answer

Next-App deployed on Vercel: Request for new refresh-token leads to unwanted 304 Not Modified-response

I built a Next-app on the frontend and deployed it on Vercel (and a Django-app on the backend deployed on Heroku). Authentication is implemented with JWTs and and a Next-API route connecting the Next-Frontend with the Django-Backend. The…
Daniel
  • 963
  • 1
  • 12
  • 29
1
vote
1 answer

Getting status code 304 on a get request with axios using react and redux

I have a get request in my Redux Async Thunk. After calling get to my node.js express server it sends a 304 status code, for some reason I can't get my data. const userTokenAxios = axios.create({ baseURL: '/api/shoes', headers: { …
Dylan L.
  • 1,243
  • 2
  • 16
  • 35
1
vote
1 answer

Vercel cache CORS headers issue for multiple domains

I have a Next.js API deployed on Vercel. The API is used by multiple other domains. When the browser send the If-None-Match header, Vercel can reply with a 304; however, the Access-Control-Allow-Origin header may contain a different origin, which…
Luze26
  • 35
  • 6
1
vote
1 answer

How does Nginx handle `If-None-Match` and `If-Modified-Since` headers when configured as a reverse proxy cache?

I have a PHP CMS as an upstream/origin server that serves content. It is placed behind a Nginx web server configured as a reverse proxy cache with proxy_pass and proxy_cache. While implementing 304 Not Modified response on the upstream/origin…
mentinet
  • 744
  • 3
  • 9
  • 23
1
vote
0 answers

Redux saga failed in production

I've been trying to tackle this problem more than 2 weeks now. Everything works fine in development mode. But not in production mode. The example below are shown using Redux Saga environment (I'm still new in redux saga). But I've tried re-do it…
1
vote
0 answers

Background images that return 304 modified not being displayed

I have some CSS like this: background-image: url('/img/high/logo.png'),url('/img/low/logo.png'); Intermittently, on Firefox on PC for sure, the image doesn't display. My debugging has led me to believe that the issue happens when the high…
Ben Holness
  • 2,457
  • 3
  • 28
  • 49
1
vote
1 answer

JavaScript-ReactJS problem with GET fetch request ReactJS

I'm trying to doing a basic GET request from ReactJS app to a Node.js API, but I'm getting a response with status 304. I need get a 200 status to save the response of GET in a variable. (Im running Reactjs app in port 3000 and Nodejs API in port…
1
vote
1 answer

Getting a 404 on a live server but 304 on a localhost with Pug

So, this is a strange one. I am running a Nodejs application using Express and Pug. I have all my static files in a Public folder and my Pug files in the Views folder. I set up the app.js file to grab all the static files from the Public folder. I…