I just thought I'd point this out as it's just caught me out.
I created a set of scripts against a test server and then proceeded to run the scripts again the production server by modifying the URL in each of the requests.
I was surprised to see that there weren't any 304 http response codes (redirects). I'd expected that once I'd hit an image on the home page (logo for example) every other page would get a 304 for that image telling the browser to get it from cache.
I discovered that the problem is that the server uses ETags and not the datetime to control the cache.
ETags are generally machine specific so scripts cannot be moved from one environment to another.
Also, as they are machine specific they become largely useless on clustered environments.
There is an obvious performance impact on the server if it has to send the whole page/image again instead of just sending the 304.
Just thought I'd let you know incase it's useful to someone.
Let's be careful out there,
Hmmm, this probably should be in the general performance testing forum. Feel free to move it mr moderator if you think it's best somewhere else.
Everywhere's within walking distance if you have enough time.
Re: Watch out for ETags in multi server environments
Good point Steve.
This page has a good discussion of both the "if-modified-since" and "if-none-match" clauses.
It seems to boil down to what you suggested, server caching behavior with respect to requests that contain "if-modified-since" or "if-non-match" clauses may vary between the server where the recording was done and a "copy" of that instance on another server.
Short of re-recording against the new instance of the server, options seem limited to;
1) Accept the overhead of extra file transfers (gives a pessimistic view of both response time, server utilization, and network utilization)
2) Edit out the etags and use "if-modified-since" (probably too much manual work in all but the simplist cases)
3) Delete the secondary gets that had 304's returned at record time (gives an optimistic skew to the response times, system and network utilization)