[
https://issues.apache.org/jira/browse/MWAR-354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15260048#comment-15260048
]
David Bullock commented on MWAR-354:
------------------------------------
An implementation note:
* Google now has
[Brotli|http://google-opensource.blogspot.com.au/2015/09/introducing-brotli-new-compression.html]
and it would seem to be a matter of time before Tomcat would support a similar
idea for that encoding (probably with a the extension
[.br|http://siliconangle.com/blog/2015/10/12/social-justice-warrior-forces-google-to-drop-bro-extension-in-brotli-due-to-it-being-misogynistic/]).
So although one would not do the work of a Brotli compresssion algorithm
prematurely (YAGNI), one should anticipate this by suitable decoupling in code
and some forethought for how to specify which algorithms to apply in future.
If multiple algorithms are supported, I would expect that some clients will ask
for GZIP encoding, and others for Brotli encoding, such that both .gz and .br
forms will need to be generated in the future.
> Generate .gz side-car files for certain resources above WEB-INF/ or in
> WEB-INF/resources
> ----------------------------------------------------------------------------------------
>
> Key: MWAR-354
> URL: https://issues.apache.org/jira/browse/MWAR-354
> Project: Maven WAR Plugin
> Issue Type: New Feature
> Reporter: David Bullock
> Assignee: Karl Heinz Marbaise
> Fix For: next-release
>
>
> Apache Tomcat 8.0 will automatically send the pre-gzipped version of a
> resource if it finds a .gz version of the file in the WAR. This is
> beneficial since: 1) it saves on CPU cycles; 2) it can leverage the operating
> system to send the file 'directly' from the disk to the network socket with
> as little handling as possible in CPU/RAM. xref the 'Note' on the
> 'compression' attribute documented at
> https://tomcat.apache.org/tomcat-8.0-doc/config/http.html
> So, I would like MWAR to do generate these pre-gzipped resources for me, at
> build time. Obviously, it need only do so for certain static assets: an
> initial 'by convention' would probably:
> - include *.html, *.jpg, *.png, *.gif, *.css files under the WAR resource
> root or subdirs
> - but exclude those found under /WEB-INF/
> - except if they were specifically found under /WEB-INF/resources/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)