ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacopo Cappellato (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-5200) Prevent caching of json ajax request
Date Tue, 25 Mar 2014 18:18:17 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-5200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13946881#comment-13946881
] 

Jacopo Cappellato commented on OFBIZ-5200:
------------------------------------------

Paul: the cache is managed by the browser but the headers (set by the server) are directives
for the client.

>  Prevent caching of json ajax request
> -------------------------------------
>
>                 Key: OFBIZ-5200
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5200
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Release 09.04, Release 10.04, Release Branch 12.04
>            Reporter: Roberto Benítez Monje
>            Priority: Minor
>              Labels: ajax, caching, ie, json, jsonresponse
>
> An user who is using IE9 might experience a strange behaviour inside a webpage with json
ajax requests. This is so because IE9 does caching of these requests.
> I added in common/../CommonEvents.java , jsonResponseFromRequestAttributes method the
following:
> response.setDateHeader("Expires", -1);
> response.setHeader("Cache-Control", "private");
> response.setHeader("Last-Modified", new Date().toString());
> response.setHeader("Pragma", "no-cache");
> response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message