Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015380Openbravo ERPA. Platformpublic2010-12-09 11:432011-05-24 10:56
0015380: Remove tomcat's Expires filter
The CacheFilter (org.openbravo.utils.CacheFilter) is the way to apply a expires header for all JavaScript files.
This adds an expires in 2038. Check the generated web.xml
    <param-value>Sun, 17 Jan 2038 19:14:07 GMT</param-value>

According with HTTP 1.1 to mark a response as 'never expires' it should send a response to expire in one year, never more than that.

"To mark a response as "never expires," an origin server sends an Expires date approximately one year from the time the response is sent. HTTP/1.1 servers SHOULD NOT send Expires dates more than one year in the future": [^]

Since the generated and static JavaScript is concatenated in a single request it makes no sense to keep this response header.

This also solves the problem of clients having js files forever and we need to prompt a 'Clean your browser's cache'

* Using tomcat, request a static file in web/js, e.g. web/js/utils.js With Firebug check the response. It expires on 2038.
* Remove the filter
* Clear the browser cache
* Request the same file
* Re-request it, the server should return 304 'Not Modified'
* Remove the Expires header from the responses.
related to feature request 0015292 closed iperdomo Concatenate all static resources to make a single request 
related to defect 0015854 closed iperdomo API model chage - Removed the CacheFilter from AD_Model_Object 
related to defect 0034500 closed shuehner Delete unused CacheFilter class 
Issue History
2010-12-09 11:43iperdomoNew Issue
2010-12-09 11:43iperdomoAssigned To => iperdomo
2010-12-09 11:43iperdomoModules => Core
2010-12-09 11:44iperdomoSummaryRemove Tomcat's CacheFilter => Remove tomcat's Expires filter
2010-12-09 11:47iperdomoRelationship addedrelated to 0015292
2010-12-09 15:46shuehnerIssue Monitored: shuehner
2011-02-02 19:17iperdomoStatusnew => scheduled
2011-02-02 19:17iperdomofix_in_branch => pi
2011-02-02 19:58hgbotCheckin
2011-02-02 19:58hgbotNote Added: 0034018
2011-02-02 19:58hgbotStatusscheduled => resolved
2011-02-02 19:58hgbotResolutionopen => fixed
2011-02-02 19:58hgbotFixed in SCM revision => [^]
2011-02-03 11:37iperdomoRelationship addedrelated to 0015854
2011-05-24 10:08dalsasuaTag Attached: closingMay2011
2011-05-24 10:56dalsasuaStatusresolved => closed
2017-07-15 16:03shuehnerRelationship addedrelated to 0034500

2011-02-02 19:58   
Repository: erp/devel/pi
Changeset: bf0478c6ef187bd9f9ae1ab686abe65d08fe5f3c
Author: Iván Perdomo <ivan.perdomo <at>>
Date: Wed Feb 02 19:57:04 2011 +0100
URL: [^]

Fixes issue 15380: Removed CacheFilter for web/* resources

M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT_PARA.xml