Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

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