Let's say cachedfile.js expires in 1 year from now, according to the HTTP 1.1 expires
header. Will these URI's both be cached seperately in modern browsers?
Request 1
cachedfile.js?var=1
Request 2
cachedfile.js?var=2
Assume Cache-control: public
and the same Etag
Yes, they will be cached separately. In fact, one trick developers use to force browsers to pull a new copy of a CSS file after they update it is to append something like ?v=2 to it (e.g.
href="styles.css?v=2"
).