Disable HTTP 304 response

Hello!

I want to disable nginx returning a 304 response to the client, as I am
interested in a higher amount of bandwidth coming through my site. In
Apache i did that by removing the if-modified-since request header, but
I can’t find an alternatinve in nginx.

Is there any?

Thanks in advance,
Igor K…

Change it to a 444 maybe? That’ll disable any response, though…

Hello!

On Tue, Oct 20, 2009 at 12:19:18PM +0400, Igor K. wrote:

Hello!

I want to disable nginx returning a 304 response to the client, as I
am interested in a higher amount of bandwidth coming through my
site. In Apache i did that by removing the if-modified-since request
header, but I can’t find an alternatinve in nginx.

Is there any?

if_modified_since off;

http://wiki.nginx.org/NginxHttpCoreModule#if_modified_since

Maxim D.

Yes, that won’t work. I need a standard HTTP 200 response with all the
content passed to the client, regardless of the If-Modified-Since
request header.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,15143,15152#msg-15152

Maxim D. wrote:

Is there any?

if_modified_since off;

http://wiki.nginx.org/NginxHttpCoreModule#if_modified_since

Maxim D.

Thanks a lot, Maxim!

There are different reasons people encounter 304 errors. Like it can be a reason for a third-party application or software or a virus on your system. The best thing to do is clear your browser cache if you are facing this issue. In case you are using Google Chrome, you can make it work by navigating to the menu icon in a new tab and navigating to More tools > Clear browsing data: Now, in the window that pops up, verify that All time is the selected option for the Time range drop-down menu and make sure that all three options are chosen before you are about to tap the option of Clear data.

You need to eliminate the problem itself, not its consequences.