mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
prevent ie from caching json responses
This commit is contained in:
@@ -67,6 +67,8 @@ public class JSONMessageBodyReaderWriter implements MessageBodyWriter<Object>,
|
||||
WebApplicationException {
|
||||
httpHeaders.putSingle(HttpHeaders.CONTENT_TYPE, mediaType.toString()
|
||||
+ ";charset=UTF-8");
|
||||
httpHeaders.putSingle(HttpHeaders.CACHE_CONTROL, "no-cache");
|
||||
httpHeaders.putSingle("Pragma", "no-cache");
|
||||
OutputStreamWriter writer = new OutputStreamWriter(entityStream, UTF_8);
|
||||
getGson().toJson(t, type, writer);
|
||||
writer.flush();
|
||||
|
||||
Reference in New Issue
Block a user