HTTP client or browser?
Tested · How we test
Based on our test of 12 open source tools on 26 public sites, from one machine with no proxy.
The measurements
- HTTP clients got the content on 51 of 130 requests. On those pages they took a median of 0.6 s and 47 MB of memory.
- Browsers got the content on 112 of 182 requests. On those pages they took a median of 3.0 s and 616 MB.
Memory is the peak memory of the tool's processes during the attempt. Time runs from sending the request to having the page, and leaves out starting the tool.
Why the gap is so large
An HTTP client sends one request and reads the HTML that comes back. A browser starts a whole browser, loads every script, style and image the page asks for, and runs the JavaScript. That is why it sees pages an HTTP client cannot, and why it costs so much more.
When each one wins
- Use an HTTP client for pages whose content is in the HTML, such as job boards, news and reference sites. It is fast and cheap enough to run thousands of pages on one small machine.
- Use a browser for pages that draw their content with JavaScript, such as social network profiles, and when you need to click, scroll or log in.
- Neither helps against a site that refuses your network address. That needs a proxy or a paid API, which we have not tested yet.