summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/com/vaadin/server/VaadinServlet.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java
index a285c327eb..0ad4dea37d 100644
--- a/server/src/com/vaadin/server/VaadinServlet.java
+++ b/server/src/com/vaadin/server/VaadinServlet.java
@@ -870,8 +870,12 @@ public class VaadinServlet extends HttpServlet implements Constants {
*/
int resourceCacheTime = getService().getDeploymentConfiguration()
.getResourceCacheTime();
- response.setHeader("Cache-Control",
- "max-age= " + String.valueOf(resourceCacheTime));
+ String cacheControl = "max-age="
+ + String.valueOf(resourceCacheTime);
+ if (filename.contains("nocache")) {
+ cacheControl = "public, max-age=0, must-revalidate";
+ }
+ response.setHeader("Cache-Control", cacheControl);
}
// Write the resource to the client.