You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Roberto Benítez Monje (JIRA)" <ji...@apache.org> on 2013/05/23 11:45:19 UTC

[jira] [Created] (OFBIZ-5200) Prevent caching of json ajax request

Roberto Benítez Monje created OFBIZ-5200:
--------------------------------------------

             Summary:  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 10.04, Release 09.04, Release Branch 12.04
            Reporter: Roberto Benítez Monje
            Priority: Minor


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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira