Coder Social home page Coder Social logo

Comments (14)

davydotcom avatar davydotcom commented on June 16, 2024

gzip files are made for all but images as images don’t need compressed by gzip. The determination of when a gzip is served in a response is normally handled by your CDN or we normally use gzip_static on; for nginx. Now that you mention it, the asset filter (if using tomcat to serve assets directly) could probably check for this as well and serve gzip. Ill look into adding that.
On Oct 28, 2013, at 2:51 PM, A Garcia [email protected] wrote:

I use to notice the .gz files being created during asset-precompile (harder to see now since I don't normally run war command when dev'ing in IntelliJ), but even now I don't see the .gz's mentioned in the manifest, or any code that would serve them up.

Patches around this have been talked about for the Rails version of the plugin, so I'm curious if I'm missing something here before I go about making a patch...?


Reply to this email directly or view it on GitHub.

from grails-asset-pipeline.

jaGarcia avatar jaGarcia commented on June 16, 2024

I'm on Tomcat using the Sumo CDN Plugin on Heroku. I haven't seen any config supported by that CDN for this determination to be made. I don't want to be a bother, but..as this is something I'm already focused on resolving, I don't mind giving the patch a crack too if you don't think you'll be able to get to it soon...

Any tips on what file would you start editing to check for the Accept-Encoding header? AssetController?

I made a post on their message board as well.

https://discussion.heroku.com/t/grails-asset-pipeline-not-delivering-gz-files/204/3

from grails-asset-pipeline.

davydotcom avatar davydotcom commented on June 16, 2024

I’d probably get you something tomorrow. That seems to be a whoops on my part. Ill make tomcat capable of doing it not sure about how the Sumo CDN plugin is being used so you may have to take it from there with regards to that.
On Oct 28, 2013, at 3:06 PM, A Garcia [email protected] wrote:

I'm on Tomcat using the Sumo CDN Plugin on Heroku. I haven't seen any config supported by that CDN for this determination to be made. I don't want to be a bother, but..as this is something I'm already focused on resolving, I don't mind giving the patch a crack too if you don't think you'll be able to get to it soon...

Any tips on what file would you start editing to check for the Accept-Encoding header? AssetController?

I made a post on their message board as well.

https://discussion.heroku.com/t/grails-asset-pipeline-not-delivering-gz-files/204/3


Reply to this email directly or view it on GitHub.

from grails-asset-pipeline.

davydotcom avatar davydotcom commented on June 16, 2024

Also are you sure your app is pointed to the CDN Sumo url by setting grails config grails.assets.url =
Which should be set to whatever the value of ENV[‘CDN_SUMO_URL’] is.

The CDN itself should be serving your assets and determining based on request headers if gzip should come back. This should be a feature of the CDN. I know rackspace CDN supports this but amazon s3 does not.
On Oct 28, 2013, at 3:06 PM, A Garcia [email protected] wrote:

I'm on Tomcat using the Sumo CDN Plugin on Heroku. I haven't seen any config supported by that CDN for this determination to be made. I don't want to be a bother, but..as this is something I'm already focused on resolving, I don't mind giving the patch a crack too if you don't think you'll be able to get to it soon...

Any tips on what file would you start editing to check for the Accept-Encoding header? AssetController?

I made a post on their message board as well.

https://discussion.heroku.com/t/grails-asset-pipeline-not-delivering-gz-files/204/3


Reply to this email directly or view it on GitHub.

from grails-asset-pipeline.

jaGarcia avatar jaGarcia commented on June 16, 2024

Gotcha....Well, would the AssetsTaglib change its references to the file (.gz or not) based on the incoming request that hits the .gsp? Or will the path be to .js always.

If it's always .js, I may be in trouble since the first non-gzip request for the .js file may cause the cache to hold that file...

from grails-asset-pipeline.

jaGarcia avatar jaGarcia commented on June 16, 2024

Yeap, I'm positive I have the Sumo CDN configured correctly...I can see my resources url's loading from .cloudfront etc which is their host

from grails-asset-pipeline.

jaGarcia avatar jaGarcia commented on June 16, 2024

Well..I should say I'm nearly very positive...double checking now that i'm not missing something

from grails-asset-pipeline.

davydotcom avatar davydotcom commented on June 16, 2024

ok cool so just need to change the filter to check if gzip is acceptable or not. and send if it exists. If you want to do this yourself before tomorrow you can check the file here:
https://github.com/bertramdev/asset-pipeline/blob/master/grails-app/conf/asset/pipeline/AssetsFilters.groovy
On Oct 28, 2013, at 3:13 PM, A Garcia [email protected] wrote:

Well..I should say I'm nearly very positive...double checking now that i'm not missing something


Reply to this email directly or view it on GitHub.

from grails-asset-pipeline.

jaGarcia avatar jaGarcia commented on June 16, 2024

Gotcha..Then I'll just have to hope that Sumo CDN has the smarts to distinguish between the same file with different Accept-Encoding headers to know which one to serve. I'd have to believe it does.

from grails-asset-pipeline.

davydotcom avatar davydotcom commented on June 16, 2024

I can’t find anything online to imply it does. Guess we will have to find out.
On Oct 28, 2013, at 3:18 PM, A Garcia [email protected] wrote:

Gotcha..Then I'll just have to hope that Sumo CDN has the smarts to distinguish between the same file with different Accept-Encoding headers to know which one to serve. I'd have to believe it does.


Reply to this email directly or view it on GitHub.

from grails-asset-pipeline.

jaGarcia avatar jaGarcia commented on June 16, 2024

Yeap...Only option if it doesn't would be to make a patch in AssetsTaglib
to render the resources url with the .gz extension if it detects the .gsp
was requested with the GZIP accept-encoding header, right?

On Mon, Oct 28, 2013 at 3:26 PM, David Estes [email protected]:

I can’t find anything online to imply it does. Guess we will have to find
out.
On Oct 28, 2013, at 3:18 PM, A Garcia [email protected] wrote:

Gotcha..Then I'll just have to hope that Sumo CDN has the smarts to
distinguish between the same file with different Accept-Encoding headers to
know which one to serve. I'd have to believe it does.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com/bertramdev/asset-pipeline/issues/40#issuecomment-27246566
.

from grails-asset-pipeline.

davydotcom avatar davydotcom commented on June 16, 2024

Version 1.0.3 Now supports serving gzip content if Accept-Encoding has a gzip line in it. Im gonna leave this ticket open until I hear back. Curious to know how heroku + SUMO CDN behave with this.

from grails-asset-pipeline.

jaGarcia avatar jaGarcia commented on June 16, 2024

We're all good with Sumo CDN too.

Thanks for the patch!

from grails-asset-pipeline.

davydotcom avatar davydotcom commented on June 16, 2024

Sweet!, On the tag lib serving up gz files this can be a problem when pages are cached so would prefer to avoid that one. But sounds like it worked! Glad to hear it.
On Oct 29, 2013, at 10:25 PM, A Garcia [email protected] wrote:

We're all good with Sumo CDN too.

Thanks for the patch!


Reply to this email directly or view it on GitHub.

from grails-asset-pipeline.

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.