I’ve been reading about problems people are having with browsers caching an old version of a javascript file and not downloading the new one when changes have been made. However every time I make a change to a js file, close the browser and open it up (or even refresh the page) the changes are reflected. I’ve tried this in IE9, FF13, Chrome18 and Safari 5.
Do newer browser versions have a way of determining if changes have been made to a .js file and then replacing the old with the new in the cache?
This has nothing to do with the browser or browser version. This has to do with caching directives.
If your server is outputting headers, allowing the client to cache the resource, then it will be cached. If your server outputs headers directing the client to not cache, then it will (usually) not be cached.
See also: http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
Browsers detect if they need to load a new version if the server specifies
Must-Revalidate.https://stackoverflow.com/a/8729854/362536