Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does the web server sent the file instead of a 304 http: not modified?

My browser send to the server the following request:

Host: www.imprimante.be
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Accept: */*
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
If-Modified-Since: Fri, 29 May 2015 14:22:44 GMT
If-None-Match: "90-5173935ad3a1a-gzip"
Referer: http://www.imprimante.be/premier-avis-gratuit/
Cookie: <hidden>
Connection: keep-alive

The url used is http://www.imprimante.be/wp-content/themes/mch_imprimante/js/theme.min.js? (note: www.imprimante.be is not accessible trough wlan yet)

And the server send me the file with this (status 200) http header:

Accept-Ranges: bytes
Connection: Keep-Alive
Content-Encoding: gzip
Content-Length: 137
Content-Type: application/javascript
Date: Wed, 03 Jun 2015 07:18:03 GMT
Etag: "90-5173935ad3a1a-gzip"
Keep-Alive: timeout=5, max=99
Last-Modified: Fri, 29 May 2015 14:22:44 GMT
Server: Apache/2.4.10 (Debian)
Vary: Accept-Encoding

As you might notice (Last-Modified: Fri, 29 May 2015 14:22:44 GMT) the file hasn't been modified since the last request.

So I don't get why the response isn't a 304 status: not modified.

I'd really like to know why the caching of this files (and some others) doesn't work as I expect it.

like image 446
Serge Profafilecebook Avatar asked Jun 03 '15 07:06

Serge Profafilecebook


People also ask

What does HTTP 304 not modified mean?

An HTTP 304 not modified status code means that the website you're requesting hasn't been updated since the last time you accessed it. Typically, your browser will save (or cache) web pages so it doesn't have to repeatedly download the same information.

How to fix HTTP 304 status code error in WordPress?

If you own the site producing the HTTP 304 status code, the final fix you can try is to check your server configuration files. The steps for doing so will vary depending on whether your server uses Apache or NGINX.

What are the different HTTP error codes?

There are a handful of different HTTP error codes you may come across online. Some of the most common are 301 and 302 redirects, as well as the infamous 404 Error. Another problem you might encounter from time to time is HTTP 304, also referred to as the “304 not modified” status code.

What does “not modified” mean on a website?

More specifically, it indicates that information wasn’t properly sent from your browser to the site’s server, which is preventing you from seeing the web page you’re trying to access. The reason this code is referred to as “not modified” is that the site you’re trying to reach hasn’t been changed since you last visited it.


1 Answers

It is bug in Apache. Turn off mod_deflate.

like image 200
venca Avatar answered Sep 22 '22 12:09

venca