Giter Site home page Giter Site logo

Comments (18)

FagnerMartinsBrack avatar FagnerMartinsBrack commented on September 28, 2024

Well... After many tries I could not find a way to disable minification from the filter feature through any option and keep only gzip, thoughts?

from wro4j.

alexo avatar alexo commented on September 28, 2024

Hi,
the less + minify + concatenation is supported by maven plugin by default. For gzip, you can create a simple Filter or reuse one from existing libraries which just gzip the response, or let the container handle the gzip.

from wro4j.

FagnerMartinsBrack avatar FagnerMartinsBrack commented on September 28, 2024

Any possibility to do and document something like this as a feature? That would be just gzip through wro4j...

from wro4j.

alexo avatar alexo commented on September 28, 2024

Ok, I'll add a dedicated filter which will handle the gzip operation.

from wro4j.

FagnerMartinsBrack avatar FagnerMartinsBrack commented on September 28, 2024

@alexo
Any news on this?

from wro4j.

alexo avatar alexo commented on September 28, 2024

@FagnerMartinsBrack Didn't have time for that. But will mark it as high priority for the next release.

from wro4j.

alexo avatar alexo commented on September 28, 2024

@FagnerMartinsBrack just to make sure I understand the requirement correctly:

A new filter will be created which will focus on handling gzip response content only. Is that correct?

from wro4j.

FagnerMartinsBrack avatar FagnerMartinsBrack commented on September 28, 2024

Yes. I could be using minify and concat at build, but as far as I know gzip can only be issued at runtime (so I miss gzip when using the build feature).

It would be very nice if you could gzip HTML too -.-, unless you wanna wait for #104 conclusion.

from wro4j.

alexo avatar alexo commented on September 28, 2024

The filter will be applied to all resources mapped by the filter. So, it will be client responsibility to define correct mapping (the same way WroFilter is configured).

from wro4j.

FagnerMartinsBrack avatar FagnerMartinsBrack commented on September 28, 2024

Oh, ok. So I map the resources according to the filter, understood.

from wro4j.

alexo avatar alexo commented on September 28, 2024

Actually I am trying to clarify the requirements.

from wro4j.

FagnerMartinsBrack avatar FagnerMartinsBrack commented on September 28, 2024

The main requirement is:

  • GZIP any resource without using the other features such as concat/minify/etc at runtime.

If it is possible we could gzip the HTML too (I am not sure if your idea is to specify file extensions in the filter also or only the path that will be looked for).

I have almost no experience in Servlet filters, so I could be making assumptions that are not possible (like some web.xml limitation).

from wro4j.

alexo avatar alexo commented on September 28, 2024

A filter handling gzipping allows flexible customization either using filter-mapping (in web.xml) or extending the filter (programmatic configuration). I don't see a better solution for this. Let me know if you have other suggestions.

from wro4j.

FagnerMartinsBrack avatar FagnerMartinsBrack commented on September 28, 2024

I think that is the way to go.

from wro4j.

alexo avatar alexo commented on September 28, 2024

Fixed in branch 1.6.x

from wro4j.

FagnerMartinsBrack avatar FagnerMartinsBrack commented on September 28, 2024

Hi, thanks for the implementation. Is there any docs yet?

from wro4j.

alexo avatar alexo commented on September 28, 2024

I'll add some docs later, just before the final 1.6.4 release will be available. It should be quite straightforward how to use it - just as it was described earlier in comments of this issue.

from wro4j.

FagnerMartinsBrack avatar FagnerMartinsBrack commented on September 28, 2024

Ok

from wro4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.