|
|
|
|
|
by oezi
617 days ago
|
|
I would assume that you would only create a new UUID if the content of the tagged file changed serverside. Benefits are readability and reduced amount of data to be transferee. UUID is reasonably save to be unique for the ETag use case (I think 64 bits actually would be enough). |
|
Having the filename be a simple hash of the content guarantees that you don’t make the mistakes above, and makes it trivial to verify.
For example, if my css files are compiled from a build script, and a caching proxy sits in front of my web server, I can set content-hashed files to infinite lifetime on the caching proxy and not worry about invalidating anything. Even if I clean my build output and rebuild, if the resulting css file is identical, it will get the same hash again, automatically. If I used UUID’s and blew away my output folder and rebuilt, suddenly all files have new UUID’s even though their contents are identical, which is wasteful.