↑ ↓ select, Enter open, Esc close

Check whether the server returns 304 Not Modified

Adjust the values, the command updates live
user@server
curl -s -o /dev/null -w '%{http_code}\n' -H "If-Modified-Since: $(curl -sI https://example.com/ | grep -i '^last-modified:' | cut -d' ' -f2- | tr -d '\r')" https://example.com/

First reads the Last-Modified header and sends it back as If-Modified-Since. If the server responds with 304, it supports conditional requests, so Googlebot and browsers do not have to reload unchanged content. A 200 means either the header is missing or the server does not evaluate it.

Note: Dynamic WordPress pages often send no Last-Modified at all, while static files like CSS or images almost always do. The same principle works for ETags with If-None-Match.

Also searched as

  • test 304 not modified curl
  • check if-modified-since support
  • does the server support conditional requests
  • last-modified header working

Related one-liners

All in SEO checks

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.