5 Ways on How to fix 304 Not Modified status code error?

What is the HTTP 304 Status code? – This status code says the resources that have been stored in the browser cache haven’t changed, it’s used to speed up the website delivery by reusing previously downloaded resources. It causes a 304 Not Modified status code when you load the website.

When you click a URL in your browser, it sends an If-Modified-Since request to check for any updates since your last visit. If there have been no changes, the server responds with an HTTP 304 code, allowing your browser to use the locally cached version of the page instead of reloading it.

HTTP 304 Status code

 

How to fix the 304 Not Modified status code.

You can fix the 304 Not Modified status code by going through 5 different methods, which are mentioned as follows, 

1. Clear the browser cache.

You can clear the browser cache and cookies on your browser settings, it will remove the local Saved cache on your system.

Doing this regularly, will save your local storage space a lot and also it will load your site faster.

 

Follow the below method to clear the cache.

Step 1: Go to your browser, and click three horizontal dots as shown in the below screenshot.

Step 2: Click -> Delete browsing data.

fix 304 not modified in chrome

Clear data in Chrome

 

Step 3: Choose the options that you want to clear like browsing history, cookies, and other site data and cached images and files, and click delete data


Note: Please ensure in the advanced option you are not clearing the saved passwords option, otherwise it will result in clearing all your saved passwords from all the sites where you have saved the passwords till now.

 

If you’re using Mozilla Firefox, follow the below methods to clear the cache.

Step 1: Open Mozilla Firefox and click the three dots at the right side of the top corner

Step 2: Then click Settings as shown in the below screenshot.

Firefox settings

 

Step 3: Click on the privacy setting.

Safari - Privacy and security

 

Step 4: Scroll down a little and Click the Clear Data option

Clear data to fix 304 not modified status

 

Step 5: Tick both box Cookies and cache or If you want to clear one option tick as shown below

Clear browser cache and cookies

Then click the clear option, to confirm the delete cache.

 

If you’re using Microsoft Edge, follow the below methods to clear the cache

Step 1: Open Microsoft Edge, click the three dots at the right side of the corner and select the setting as shown in the below screenshot.

Microsoft edge settings

 

Step2: Click Privacy, search, and services

Privacy, Search and Services in edge

 

Step4: Scroll down to the Delete Browsing data option and click Choose What to clear option.


Clear cache in edge

 

Step5: Now check the box browsing data, download history, cookies, and other site data, and cache image files and click clear now to clear the cache data.

Delete browser date in egde

 

If you’re using Safari, follow the below methods to clear the cache

Step1: Click Safari at the top of the corner


Safari Settings

 

Step 2: Choose the Advanced tab, then check the box next to the Show feature for the web Develop bar.

Show features for web developers

 

Step3: Navigate back to the menu on the top, and select Develop and click Empty Caches.

Empty Caches in Safari to Fix 304 Not Modified

Also Read: Manual Clear Cache on WordPress

 

2. Flush the DNS

Like the web browser cache, Operating system also stores the cache files.

Unlike the browser cache, the Domain name system (DNS), will also store the IP addresses, resource records, and hostnames.

Flushing DNS at regular intervals period time Improves operating system performance and Prevents search behaviour tracking by making it difficult for hackers to anticipate or access your browsing history.

 

  • If you using Google Chrome, please follow the below methods

Step1: Open Google Chrome, you can flush the DNS by entering the path into the address chrome://net-internals/#dns

Flush DNS in Chrome

Step2: A new page will open and click Clear host cache

 

  • By Command prompt

Type CMD in the Window search bar. You will see the command prompt and choose Run as administrator as shown in the screenshot to execute the command on your system.

Command prompt to 304 not modified fix

 

Once entered into the command prompt and enter the below command.

ipconfig /flushdns

flush dns in cmd

 

3. Check the redirection code is set correctly in .htaccess

If the two above methods didn’t work for you, please check your .htaccess which will be located in your web hosting control panel -> file manager. If you do not see any .htaccess file, then Click the settings icon at right top.

fix 304 not modified in htaccess

 

Then check the show Hidden Files and now you can see your .htaccess file in the public html folder.

show hidden files in cpanel

 

Rename your current .htaccess file to .htaccess_dis. Create a new .htaccess file with the default code. If this resolves the 304 error, check the old file for redirection issues. For Nginx servers, review the website logs since .htaccess isn’t applicable.

4. Disable the Browser extension.

A corrupted browser extension can lead to the “304 Not Modified” error. To fix this, disable your extensions.

For Google Chrome: Open Chrome, click the three dots in the top right corner, go to Extensions, and select Manage Extensions.

disable browser extensions to fix

 

Then click the option as shown in the screenshot to disable the extensions.

Remove Extension in Chrome Browser

If you want to remove the extension completely from your browser, then click Remove


If you’re using Microsoft Edge, please follow the below method to disable the extension.

Step1: Open Microsoft Edge, then click the three horizontal dots at the right side of the corner and click Extension as shown below

Microsoft Edge Extension

 

Step 2: Then click manage extension.

Manage Microsoft edge extension

 

Step 3: Then click the disable toggle option to disable your extension as shown in the above screenshot.

 

If you are using Mozilla Firefox, follow the below method.

Step1: Open Mozilla Firefox, then click on the extension Icon

Firefox extensions

 

Step 2: Then click manage extension.

Manage extensions in firefox

 

Step 3: Then click the toggle switches that you want to disable the extension.

Disable extension to fix status code

 

If you are using Safari, follow the below method.

Step 1: Select Safari > Settings or Preferences, then select Extensions.

Step 2: To disable an extension, uncheck it’s box.

Safari extension

 

If you not using the extension, you can uninstall the extension by clicking the uninstall option

Then again open the browser and enter the website that you want to visit, to check whether the issue 304 not modified status issue was resolved or not.

5. Run anti-virus.

Sometimes the error code 304 not modified occurs because of a corrupted browser by malware infection. If you’re using Google Chrome, First check your Chrome version is up to date.

If not, you can follow the below steps to update the Chrome version to the latest one. 

Step 1: Click on three dots, on the right of the corner, and click setting as shown in the below screenshot.

Microsoft edge settings

 

Step 2: Navigate to About Chrome, then click the Relaunch button to update the Chrome version

Relaunch Chrome Browser

 

If You are using any other browser, try to keep your browser version up to date.

You can use any Anti-virus software on your desktop, to clean malware or virus on your computer.

 

Factors Lead to the “304 Not Modified” status code:

The following 304 not modified error can happen on either the server or client side. If you facing an error on your site here are the following reasons that cause you the error.

Corrupt Application: If the application contains corrupted files that link with the user’s browser, it may hinder the browser’s ability to save web pages and update information properly

The software installation recently: If you installed or uninstalled software on your desktop recently, that leads to invalid or outdated entries, which can result in errors in your system. This also impacts your browser’s communication and caching system

Malware or Virus: If the user facing any one of the issues with the browser, they may also face the problem of interacting with web servers and caching web pages.

The 3xx status codes are used to improve the website page speed and redirect from one site to another. The error will happen When a server or browser is not properly configured, interaction between them can be disrupted, leading to an HTTP 304 “Not Modified” status code

With this article, you will learn how to resolve the issue by following the five right methods.

Make sure that after executing each method, ensure that you are again relaunching the browser.

 

Frequently Asked Questions:

1. The 304 Not modified status code is Bad?

No, it is not bad It will check if the provided resource status has been modified since the last it was accessed.

2. How to avoid the 304 Not modified status code error?

We can’t avoid the status code error; it was not an error; it is a response telling us the data has not been modified since the last time it was accessed. But you can fix it by deleting cache data, minimizing unnecessary requests, and reducing the chances of encountering a 304 response.

3. Does 304 Not Modified status code improve web performance?

It will save bandwidth consumption and improve the loading speed by reusing the cache data in the browser

4. How does the 304 status Not modified status code differ from the 404 and 503 status codes?

The 304 status code says that the resources have not been modified, the 400 says that the request page was not found and the 503 says that the Disk space quota has been exceeded for your site