From 64cf62e08140f5efd2fc6e659663bbf8b82ed9bf Mon Sep 17 00:00:00 2001 From: Frank Wennerdahl Date: Thu, 24 Jan 2013 09:39:12 +0100 Subject: [PATCH] Fixed history and header update in IE Due to Internet Explorer caching GET requests the Undo/Redo list and column headers were not updated, leaving essential parts of the user interface crippled even if Google Frame is installed. Adding Cache-Control headers to the responses fixes this. --- main/src/com/google/refine/commands/Command.java | 1 + .../src/com/google/refine/commands/project/GetModelsCommand.java | 1 + 2 files changed, 2 insertions(+) diff --git a/main/src/com/google/refine/commands/Command.java b/main/src/com/google/refine/commands/Command.java index bca60e07a..d4466c7f4 100644 --- a/main/src/com/google/refine/commands/Command.java +++ b/main/src/com/google/refine/commands/Command.java @@ -303,6 +303,7 @@ public abstract class Command { response.setCharacterEncoding("UTF-8"); response.setHeader("Content-Type", "application/json"); + response.setHeader("Cache-Control", "no-cache"); Writer w = response.getWriter(); JSONWriter writer = new JSONWriter(w); diff --git a/main/src/com/google/refine/commands/project/GetModelsCommand.java b/main/src/com/google/refine/commands/project/GetModelsCommand.java index 7276f9848..e8a2a39f1 100644 --- a/main/src/com/google/refine/commands/project/GetModelsCommand.java +++ b/main/src/com/google/refine/commands/project/GetModelsCommand.java @@ -85,6 +85,7 @@ public class GetModelsCommand extends Command { try { response.setCharacterEncoding("UTF-8"); response.setHeader("Content-Type", "application/json"); + response.setHeader("Cache-Control", "no-cache"); Properties options = new Properties(); JSONWriter writer = new JSONWriter(response.getWriter());