HTTP: max length of etag

Viewed 6891

Does the HTTP protocol specify a max length for the ETag?

2 Answers

No, an entity-tag is a quoted-string with an optional weak indicator prefix and can be of any length in theory.

In practice, the length of a header field is limited, both by user agents and web servers. The maximum viable length of the entire header field should be somewhere at 8 KiB.

Related