Static File Retrieval From Web Server Quicker Than Browser Cache
It’s a small not-very-useful exercise, but, as the result is unexpected for me – here it is.
I’ve created a web page where two images are served as static files, and two images are served by a Java Servlet. The images served as static files (top two images) are cached by the browser for future runs.
The results are as following:
The actual numbers are irrelevant, but the relative ratios consistently demonstrate that the web server “can” serve images much quicker (disregarding network latency) than the browser can retrieve them from cache. As expected, web servers serve static files quicker than they can serve Java Servlets.
Sidenote: damn, browser image resize is ugly.