Reputation: 1
Jmeter is giving very high response time(12 seconds) for the request which retrieves 124 cached embedded requests from jmeter http cache manager (Jmeter is cached 120 requests--304 response code and 4 request not cached--200 response code), even http cache manager cache 120 requests why it's giving more response time it's not matching to browser.When browser downloading 124 request it takes 2 to 3 seconds retrieves from memory/disk cache. How can i simulate the same response time in jmeter.
Please see the screen shot jmeter and browser response times in below drive link https://drive.google.com/drive/folders/1NnGD3dPgmDn60W6CZ534KkU-x2E76Dwy?usp=sharing
Upvotes: 0
Views: 301
Reputation: 168157
JMeter's HTTP Cache Manager will return embedded resources (images, scripts, styles, etc.) from cache starting from 2nd request, for the first request for each virtual user/iteration you will always get full content.
If you're comparing the first request make sure to tick Disable cache
box in browser developer tools:
You might also want to inspect request headers and ensure that JMeter sends exactly the same headers via HTTP Header Manager, for example Accept-Encoding header can greatly reduce response time due to requesting compressed content from the endpoint.
More information: How to make JMeter behave more like a real browser
Upvotes: 0