Forum Discussion
AlexanderM
Staff
15 years agoHello Rasim,
The reason for such differences is the fact that some of the requests are conditional ones. That is, they have the "If-Modified-Since" and/or "If-None-Match" fields in the request header. A browser sends a conditional request for some resource, if this resource is present in the browser's cache. The idea is to avoid loading from server the resources that did not changed since the time they were cached.
The first step to avoid such issues is clearing the browser cache before recording - if there is nothing in the cache, the browser will not send conditional requests.
But some resources may be requested several times during the same recording session. So, the second and further requests may be conditional anyway. To avoid this, you can modify the recorded task - clear the "If-Modified-Since" and "If-None-Match" header fields, and change the expected response for such requests to 200 (on the Response tab). Clearing the fields should make the server always return the 200 response with the actual resource contents.
I hope this helps.
The reason for such differences is the fact that some of the requests are conditional ones. That is, they have the "If-Modified-Since" and/or "If-None-Match" fields in the request header. A browser sends a conditional request for some resource, if this resource is present in the browser's cache. The idea is to avoid loading from server the resources that did not changed since the time they were cached.
The first step to avoid such issues is clearing the browser cache before recording - if there is nothing in the cache, the browser will not send conditional requests.
But some resources may be requested several times during the same recording session. So, the second and further requests may be conditional anyway. To avoid this, you can modify the recorded task - clear the "If-Modified-Since" and "If-None-Match" header fields, and change the expected response for such requests to 200 (on the Response tab). Clearing the fields should make the server always return the 200 response with the actual resource contents.
I hope this helps.