Changes between Version 2 and Version 3 of GZIPFilter
- Timestamp:
- 07/21/08 19:58:00 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GZIPFilter
v2 v3 10 10 == Overview == 11 11 12 Compression reduces the size of HTTP responses and compressed content is now understood by many browsers (its been around since HTTP/1.1) including firefox 1+, IE5+, etc. This can speed up the time it takes for pages with lots of content to refresh and draw. Most developers don't realize this because they usually test using localhost. Responses sent by GN will only grow larger as both the metadata standards and the content they contain grow richer and the user interface becomes more complex (read more JavaScript). As an example, a large iso19139 metadata record with a few sizeable select/pulldown lists took half the time it used to take to render when the compression filter was added. 12 Compression reduces the size of HTTP responses and compressed content is now understood by many browsers (its been around since HTTP/1.1) including firefox 1+, IE5+, etc. This can speed up the time it takes for pages with lots of content to refresh and draw. Most developers don't realize this because they usually test using localhost. Responses sent by GN will only grow larger as both the metadata standards and the content they contain grow richer and the user interface becomes more complex (read more JavaScript). As an example, a large iso19139 metadata record with a few sizeable select/pulldown lists took half the time it used to take to render when the compression filter was added. 13 13 14 A GZIP compression filter has been written for general use by the people at jspbook.com - [http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html Two servlet filters every web app should have] - this filter has been adapted for use in GeoNetwork and some issues that caused trouble in Internet Exploder has been fixed. 14 A GZIP compression filter has been written for general use by the people at jspbook.com - [http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html Two servlet filters every web app should have] - this filter has been adapted for use in GeoNetwork and some issues that caused trouble in Internet Exploder has been fixed. The filter will only be applied to requests that can accept gzip compression and to requests that are not asking for type image/* as images are almost always compressed anyway. 15 15 16 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. 16 17 17 18 === Proposal Type === … … 21 22 22 23 === Links === 23 * '''Documents''': [http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html Two servlet filters every web app should have] 24 * '''Documents''': [http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html Two servlet filters every web app should have] and [http://www.http-compression.com/ for a discussion of http compression and browser support] 24 25 25 26 === Voting History === … … 29 30 30 31 == Motivations == 31 The current configuration is .... A change to ....32 Compression of HTTP responses from GeoNetwork will speed up page refreshes and reduce the network footprint required to run GeoNetwork - see overview above. 32 33 33 == Proposal == 34 An in depth proposal can be found here : link 35 ... 34 == Proposal == 35 36 Insert compression filter in servlet path. 37 38 This involves modifications to web/geonetwork/WEB-INF/web.xml and web/geonetwork/WEB-INF/web.xml as follows: 39 40 {{{ 41 <filter> 42 <filter-name>GZIPCompressor</filter-name> 43 <filter-class>com.jspbook.GZIPFilter</filter-class> 44 </filter> 45 46 <filter-mapping> 47 <filter-name>GZIPCompressor</filter-name> 48 <url-pattern>/*</url-pattern> 49 </filter-mapping> 50 51 }}} 52 53 and finally the inclusion of a new jar: GZIPFilter.jar in web/geonetwork/WEB-INF/lib and web/intermap/WEB-INF/lib. 36 54 37 55 === Backwards Compatibility Issues === 38 56 57 Some allusion is made in various places on the net to early versions of browsers not properly supporting compressed content - see [http://www.http-compression.com/ for a discussion of http compression and browser support]. The short answer is that the browsers we want to support (IE 7+, Firefox 2+ and others) all support compressed content without issues. 58 39 59 == Risks == 40 60 61 Unknown. 62 41 63 == Participants == 42 * List of participants and role (if necessary) in current GIP64 * As above 43 65