🏆 SEO Agency of the Year 2024, 25
Hire us Book a Meeting
SEO Discovery Google Partner
SEO Discovery
Call us Email WhatsApp
— Navigation
Hire us Book a Meeting
Technical SEO HTTP Status Codes Numbers

304 Not Modified

Quick Definition

The 304 Not Modified status code is used in the Hypertext Transfer Protocol (HTTP) to indicate that the resource has not changed since the last time it was accessed by the client. The server sends the same resource but instructs the browser to utilize the version of the resource in its cache.

01 — OverviewWhat Is 304 Not Modified?

This minimizes the amount of data transferred between the server and browser. It can save bandwidth, decrease server load, and increase the efficiency of repeat visits. A 304 response is neither a failure nor a redirect. It just states that the resource that was previously cached may still be used.

02 — ImpactWhy Is 304 Not Modified Important?

A 304 response aids websites in providing unmodified resources more efficiently. If a browser already has a copy of a resource, it doesn't need to download the same file again.

Some advantages are:

  • Minimizes Data Transfer: The server does not have to transfer the resource again, since it is not changed.
  • Optimizes Server Resources: Less data transfer may mean less work for the server.
  • Optimizes Repeat Visits: Cached resources can be loaded faster by repeat visitors.
  • Efficiency for Large Websites: Websites that have lots of visitors and often-used resources can gain from efficient caching.

A 304 response is mainly related to caching and website efficiency. It does not have a direct impact on search rankings, but proper caching can help with the website's performance.

03 — MechanicsHow Does 304 Not Modified Work?

When the browser or crawler already has a version of a resource and the server responds with a 304, this means that it has not changed.

Typically, the procedure is as follows:

  • The Browser Requests a Resource: The browser is requesting a webpage or resource that might be in the browser's cache.
  • The Browser Sends Previous Information: The request may include an If-Modified-Since date or an ETag identifying the version it already has.
  • Server Checks for Changes: The server compares this information to the current version.
  • The Server Returns 304: If there is no change, the server sends a 304 response instead of sending the entire resource.
  • The Browser Reuses Its Cached Copy: The browser reuses its previously cached version.

This occurs in the background and typically requires no action on the part of the visitor.

04 — HeadersWhich Headers Are Used With 304 Not Modified?

There are two typical HTTP headers that might be used to help figure out if a resource has changed.

If-Modified-Since

This header indicates the last time that a specific resource was received by the browser. If the resource is not updated from that time, then the server may return a 304 response.

If-None-Match

The If-None-Match header is used with an ETag that is used to identify a specific version of a resource. If the ETag received by the browser is the same as the most recent version, the server may respond with 304 Not Modified.

These headers enable browsers and servers to validate a resource without downloading the same resource again.

05 — Use CasesWhen Does 304 Not Modified Occur?

A 304 response may be returned when a browser/crawler requests a resource that has been previously requested and obtained.

Common situations include:

  • Returning Visitors: A visitor comes back to the site, and the browser sees if any resources have been modified.
  • Repeated Resource Requests: Requests the same images, CSS files, JavaScript files, or other resources again.
  • Search Engine Crawling: Search engine crawlers can determine if a previously visited resource has changed.
  • Unchanged Website Assets: Logos, icons, stylesheets, and scripts have been the same for a very long time.

A 304 response is for a specific resource that is being requested. It does not imply that all the content of a Web page has not changed.

06 — ExampleA Real Example of 304 Not Modified

Assume that a web shop has the same logo for all web pages.

The first time somebody visits the site, the logo is downloaded and saved in the browser's cache. Subsequent visits to the same site can include a check with the server to see if the logo has been updated.

If the logo hasn't changed, the server will return a 304 Not Modified response. The browser will now access the cached version, rather than the download of the logo.

The same thing could occur for images, CSS files, JavaScript files, and other resources that don't change.

07 — SEO ImpactDoes a 304 Not Modified Affect SEO?

A 304 Not Modified response does not directly affect SEO. This reduces the need for search engine crawlers to download the same resources over and over. This can help to avoid unnecessary data transfer and make crawling faster, particularly when crawling a large website or websites that have a lot of pages or resources that are accessed often.

If a 304 response is received, the page will not be removed from search results or prevented from being crawled. It just states that the requested resource hasn't changed. But the caching needs to be set up properly to ensure that updated content is provided if it is needed and not outdated versions.

SEO services can also solve technical and optimization problems that could impact website performance for businesses focused on improving website visibility and performance.

08 — Comparison304 Not Modified vs. 200 OK

Both a 304 Not Modified and a 200 OK response can be returned during normal website activity, and both return resources, but in different ways.

If the server successfully returns the requested resource, it will return the 200 OK response. If a 304 is returned, the browser knows that the resource has not changed and can use the version it has in its cache.

For instance, when downloading an image for the first time, a browser can get a 200 response. The server may return a 304 response if it asks for the same unchanged image later.

09 — How-ToHow Can You Check a 304 Response?

You can view the HTTP status codes by using the browser developer tools, server logs, or crawling tools as a website owner or SEO professional.

In Google Chrome:

  1. Open Developer Tools and click on the Network tab.
  2. Reload the webpage.
  3. Check the requests from the browser.
  4. Look at the status column for each resource.
  5. Search for resources that provide a 304 response.

A wider website audit can also help to highlight technical and performance problems that are impacting the delivery of website resources.

10 — PitfallsCommon Issues With 304 Not Modified

The 304 response is not typically an issue. Caching problems may arise if it is set up incorrectly.

Common problems include:

  • Older Cached Content: If the site has been updated, visitors may be viewing an older version of the content.
  • Incorrect Cache Headers: Headers that are not correctly configured can have an impact on the way that browsers check for resources.
  • Excessive Cache Checks: Settings that are inefficient may cause extra validation requests.
  • Wrong Use of 304: 304 should not be used to replace redirects or indexing controls.

The purpose is not to remove 304 responses. Rather, the caching system should be designed to be able to serve unchanged resources and to serve up-to-date resources correctly.

11 — TakeawayFinal Thoughts on 304 Not Modified

If the browser or server has not changed, they can avoid reading and downloading resources using a 304 Not Modified response. If a browser has a valid cached version, the server can send a 304 response to the browser, which will then use that version.

This can minimise data transfers for unnecessary files, save bandwidth, and improve caching. A 304 will not be a mistake and will not directly harm SEO. A well-optimized website and good caching will help to achieve a more efficient website experience.

12 — FAQsFrequently Asked Questions

What is a 304 Not Modified status code in simple words?

It tells the browser that a resource hasn't changed since it was last accessed, so the browser can reuse the copy it already has in its cache instead of downloading it again.

Is a 304 Not Modified an error?

No. A 304 response is neither a failure nor a redirect. It simply states that the previously cached resource may still be used, which saves bandwidth and speeds up repeat visits.

Does a 304 response affect SEO?

Not directly. It stops crawlers from downloading the same resources repeatedly, which can make crawling more efficient, but it doesn't remove a page from search results.

What's the difference between 304 Not Modified and 200 OK?

A 200 OK returns the requested resource successfully. A 304 tells the browser the resource hasn't changed, so it can use the version already in its cache instead of downloading it again.

What causes a 304 Not Modified response?

It happens when a browser or crawler requests a resource it has requested before, and the server confirms it hasn't changed using headers like If-Modified-Since or If-None-Match with an ETag.