# If-Modified-Since Header — Syntax, Values & Examples

> Asks the server to send the resource only if it changed after the given date — otherwise a 304.

When a cached response carries `Last-Modified`, the browser revalidates by sending that date back in If-Modified-Since. If the resource hasn't changed since, the server answers [304 Not Modified](https://www.devkult.com/http/304.md) with no body. When a request carries both `If-None-Match` and If-Modified-Since, servers use the ETag and ignore the date.

- Type: Request header
- Category: Caching
- Defined in: [RFC 9110 §13.1.3 — If-Modified-Since](https://www.rfc-editor.org/rfc/rfc9110.html#section-13.1.3)

## Syntax

```http
If-Modified-Since: <day-name>, <day> <month> <year> <hh>:<mm>:<ss> GMT
```

## Examples

```http
If-Modified-Since: Wed, 14 Oct 2026 09:30:00 GMT
```

the Last-Modified value from the cached response

## Good to know

- Dates have one-second resolution, so two changes within a second can be missed — ETags don't have that problem.
- Only meaningful for GET and HEAD.
- The date must be in GMT, in the HTTP date format.

## Who sets If-Modified-Since

Browsers send If-Modified-Since on their own when revalidating a cached response that had `Last-Modified`. To test, copy the date from a response and send it back: `curl -sI -H 'If-Modified-Since: Wed, 14 Oct 2026 09:30:00 GMT' https://example.com/app.css` — an unchanged file returns 304.

## Check it

In the browser, open DevTools → Network, pick a request and look under Request Headers. From the command line, curl's verbose mode prints every header it sends, prefixed with `>`:

```sh
curl -sv https://example.com/ -o /dev/null 2>&1 | grep '^>'
```

## FAQ

### Should I use ETag or Last-Modified?

Send both if you can. ETags are more precise; Last-Modified is easy to produce for files and also feeds browsers' heuristic caching.

## Status codes it appears with

- [304 Not Modified](https://www.devkult.com/http/304.md)

## Related headers

- [Last-Modified](https://www.devkult.com/headers/last-modified.md): The date and time the server believes the resource last changed.
- [If-None-Match](https://www.devkult.com/headers/if-none-match.md): Makes a request conditional: send the resource only if its current ETag isn't one of those listed.
- [ETag](https://www.devkult.com/headers/etag.md): An identifier for a specific version of a resource, used to revalidate cached copies and to prevent lost updates.
- [Cache-Control](https://www.devkult.com/headers/cache-control.md): Directives that tell browsers and CDNs whether, where and for how long a response may be cached.

## Further reading

- [HTTP caching explained](https://www.devkult.com/blog/http-caching-explained.md)

Open the interactive page: https://www.devkult.com/headers/if-modified-since