https://developer.mozilla.org/en-US/docs/Web/Security/Subres...
Seems like it would be crazy not to use it for caching.
It’s still a reasonably effective solution for CSRF, though there are much simpler options, but today’s bots largely have cookie jars so you will likely need a CAPTCHA.
Also my comment above is not an endorsement of the methodology, it’s just a thing that happened.
document.querySelector("form > input");
That doesn't rely on names at all. Just like a human can use eyes to find the right input, the javascript can use the DOM tree to find the right input.
I understand that it provides CSRF protection. It's basically a CSRF token embedded in the name.
An example of something dynamic in your URL that's not a form input would be links to various articles posted through some type of CMS. For example http://example.com/article?id=foo or even http://example.com/article/foo . In both cases if foo doesn't exist, a badly-written error page could print out "Error, foo was not found" without escaping foo.
But why? Isn't the whole point of caching to improve delivery if static assets?
Did they run into staleness problems? Then why not use if-modified-since/if-none-match?
Just like they already randomise asset filenames to avoid caching.