These are my results for now:
|Method||IE6||Firefox 1.07||Firefox 1.5b2||Safari 2.0||Opera 8.5|
|xhr_post||not cached||not cached||not cached||not cached||not cached|
|xhr_get||cached||not cached||cached||not cached||not cached|
(Results are the same for Win and OS X where both browsers are available (FF & Opera))
This gives an interesting picture: Firefox does not seem to cache any scripts, neither the ones loaded via DOM nor those loaded via XHR. Only IE loads an XHR GET request from cache.
I've got the script in my public testing area, so you can test it for your own browser. Please do so and correct my values if you receive different results.
The sources of my tests are available, too: index.phps and js.phps. I did my testings using the latest prototype.js library. Maybe I will try it later on with another library (e.g. with dojo.io.bind).
I'd be interested in more ways to download code (especially via document.write since I haven't been able to include this properly to my tests) and in your results for other browsers. Just leave a comment.
UPDATE: I have now included the