gigaZhang / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

Adding the gz versions of all js files #1106

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The struts 2 jquery plugin has the js and min.js of all java script files in 
it. 
As the plugin automatically handles loading all js files, I think it would be a 
good choice to provide gz version of all js files too.
So the head tag can load gz version automatically.  

Original issue reported on code.google.com by afattah...@gmail.com on 10 Jun 2014 at 5:09

GoogleCodeExporter commented 9 years ago
There is a project in github at https://gist.github.com/suprememoocow/1570654
This is a servlet which automaticly sends the .gz version of a resource when 
the browser accept gz and the gz file is there. 

For example if the folder contains sample.js and sample.js.gz and the brwoser 
accept gz, then it will send the sample.js.gz.

I don't know if this approach can work with strust resource management, but the 
idea behind this simple servlet could be good to use in struts 2 jquery plugin.

Original comment by afattah...@gmail.com on 29 Jun 2014 at 1:57