Skip to content

Adding an option to serve archived (gzipped) resources#194

Open
alikg wants to merge 8 commits intoTop-Q:masterfrom
alikg:master
Open

Adding an option to serve archived (gzipped) resources#194
alikg wants to merge 8 commits intoTop-Q:masterfrom
alikg:master

Conversation

@alikg
Copy link
Contributor

@alikg alikg commented May 15, 2018

if we set enable.archived.resources=true in the properties file we will be able to
store ONLY the .gz version of the resource and return it to requesting client if the original version is not found.

Consider a request for a resource test.js
The flow will be the following
if test.js exists
if test.js.gz exists and supported by browser return test.js.gz
else retrurn test.js
else if test.js.gz exists and return if so (but still report the original resource's name)

else return null (as we would anyway).

@alikg
Copy link
Contributor Author

alikg commented May 16, 2018

Added a ZipOnTheFly mechanism which will compress all non-excluded extensions before uploading them to the remote server;
There are two new settings in remoteDifido.properties
#the value is in bytes!
compress.files.above=5000
#the following the extensions that are NOT compressed by default
dont.compress.extensions=7z;zip;rar;gzip;gz;jpg;jpeg;png;gif;avi;xvid;mp4;mp3;tif;tiff;pdf;wmf;svg;exe;jar

@alikg alikg closed this May 24, 2018
@alikg alikg reopened this May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant