Reverberations

News, Views, Rants and Raves About Technology and More

Static File Retrieval From Web Server Quicker Than Browser Cache

leave a comment »

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:
Jetty:

[Server]
jetty-server-1.png

[Cache]
jetty-cache-1.png

Tomcat:

[Server]
tomcat-server-1.png

[Cache]
tomcat-cache-1.png

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.

Written by Brajesh

January 1, 2008 at 4:19 pm

Posted in Coding, Java, Jetty, Tomcat

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: