Changes between Version 4 and Version 5 of GZIPFilter
- Timestamp:
- Dec 18, 2008, 1:45:33 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GZIPFilter
v4 v5 34 34 One other function that may prove to be useful has been added to the filter. This function sets the expiry date on certain types of content (javascript, css, locale images) into the far future. The idea here is that this content will not be downloaded each time a user returns to a previously loaded page - instead this content will be found either in the web browser or proxy cache. The down side with this feature (apart from whether it really saves all that much anyway) is that the filenames of the static content need to change when a new version of GeoNetwork is released to avoid stale static content being retrieved from the cache. This is not implemented in GeoNetwork and whether it is worth it will depend upon further testing of the worth of this feature. 35 35 36 Steps needed to insert compression filter in servlet path. This involves modifications to web/geonetwork/WEB-INF/web.xml and web/ geonetwork/WEB-INF/web.xml as follows:36 Steps needed to insert compression filter in servlet path. This involves modifications to web/geonetwork/WEB-INF/web.xml and web/intermap/WEB-INF/web.xml as follows: 37 37 38 38 {{{ 39 <filter> 40 <filter-name>GZIPCompressor</filter-name> 41 <filter-class>com.jspbook.GZIPFilter</filter-class> 42 </filter> 39 <!-- modified version of jspbook code to support selective compression, 40 and fix bugs that broke IE - see GZIPFilter.jar --> 41 <filter> 42 <filter-name>GZIPCompressor</filter-name> 43 <filter-class>com.jspbook.GZIPFilter</filter-class> 44 <init-param> 45 <param-name>urls-to-expire-forward</param-name> 46 <param-value>/geonetwork/scripts,/geonetwork/images,/geonetwork/loc</param-value> 47 </init-param> 48 <init-param> 49 <param-name>do-not-gzip-these-urls</param-name> 50 <param-value>.gif,.jpg,.png,.tif,.bmp,.zip,.gzip</param-value> 51 </init-param> 52 </filter> 43 53 44 45 46 47 54 <filter-mapping> 55 <filter-name>GZIPCompressor</filter-name> 56 <url-pattern>/*</url-pattern> 57 </filter-mapping> 48 58 49 59 }}}