Web server with URL fingerprinting out of the box
Years ago when we built Mugshot we stumbled on “URL fingerprinting,” Google describes it here. We used a “build stamp” (a continuously incrementing build number) instead of an MD5, but same thing. My guess is that many web sites end up doing this. Owen implemented the feature by writing a custom Apache module.
It seems like the major web servers should do this out of the box. For a directory of static files, the web server could:
- Generate a fingerprint for each file
- Generate URLs containing the fingerprints
- Communicate the fingerprint-containing URL back to the app server for use in templates (for example by writing out a simple text file with the mapping from original to fingerprinted URLs)
- Set the infinite-expiration headers properly on the fingerprinted URLs
It is not a huge deal to script this yourself I guess, but do any web servers do this out of the box? Or maybe it’s a Varnish feature?
Ideally it’s dynamic, so if you change your static files the fingerprinted URLs automatically update.