Another Java Servlet Filter Most Web Applications Should Have
Subject:   what if app server fronted by web server
Date:   2004-04-16 00:32:47
From:   NielsUll
Response to: what if app server fronted by web server

The tip is still valid - you just need to make the web server add the headers instead. For example, with apache you should use mod_headers.

While the lower load on your web server might be irrelevant (most likely, it's not that loaded anyway), the end user experience is likely be much better if the browser doesn't have to fetch all stylesheets, scripts, logos etc before rendereing pages. Even if it uses the if-modified-since header to not actually fetch the resource, it still has to make a round-trip to verify it before it can start rendering.

In addition, many browsers (such as IE) will not cache content received over SSL, since it's implicitly assumed to be confidential. But the cache-control: public header will make it cacheable anyway.

Of course, the overall effect depends on your web design. If you're sticking to Jakob Nielsen designs, you probably won't see much of a difference.