Changes between Version 2 and Version 3 of GZIPFilter


Ignore:
Timestamp:
07/21/08 19:58:00 (16 years ago)
Author:
simonp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GZIPFilter

    v2 v3  
    1010== Overview ==
    1111
    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. 
     12Compression 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.
    1313
    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.
     14A 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.
    1515
     16One 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.
    1617
    1718=== Proposal Type ===
     
    2122
    2223=== 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]
    2425
    2526=== Voting History ===
     
    2930
    3031== Motivations ==
    31 The current configuration is .... A change to ....
     32Compression of HTTP responses from GeoNetwork will speed up page refreshes and reduce the network footprint required to run GeoNetwork - see overview above.
    3233
    33 == Proposal ==
    34 An in depth proposal can be found here : link
    35 ...
     34== Proposal ==
     35
     36Insert compression filter in servlet path.
     37
     38This 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
     53and finally the inclusion of a new jar: GZIPFilter.jar in web/geonetwork/WEB-INF/lib and web/intermap/WEB-INF/lib.
    3654
    3755=== Backwards Compatibility Issues ===
    3856
     57Some 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
    3959== Risks ==
    4060
     61Unknown.
     62
    4163== Participants ==
    42  * List of participants and role (if necessary) in current GIP
     64 * As above
    4365