Comments (14)
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.
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.
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.
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.
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.
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.
Well..I should say I'm nearly very positive...double checking now that i'm not missing something
from grails-asset-pipeline.
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.
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.
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.
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.
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.
We're all good with Sumo CDN too.
Thanks for the patch!
from grails-asset-pipeline.
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)
- External Dev Time Directory HOT 2
- Exception processing static resources from spring-security-ui HOT 5
- How to apply grails tag or GString in js files in assets path
- Doesn't handle invalid URLs.
- Release a v2.11.2 of the Grails 2 plugin
- No such property: file for class: asset.pipeline.grails.AssetPipelineFilter
- Asset compilation fails on require('moment') HOT 2
- Null handling issue in asset-pipeline 2.8.0 HOT 1
- Asset Pipeline doesn't handle a missing file or src attribute in a g.resource taglib call
- grails plugin asset-pipeline version 2.13.1 broken (No such property: responseBuilder for class: asset.pipeline.grails.AssetPipelineFilter) HOT 3
- less asset files are not compiled when packaging a binary grails 2 plugin
- assets-scoped dependencies are not resolved with pathingJar enabled HOT 1
- Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <asset:stylesheet>: java/util/Objects HOT 3
- Getting Cannot invoke method assetBaseUrl() on null object exception while running grails application with inline grails plugin HOT 1
- CVE-2015-5237 in protobuf HOT 2
- Grails Asset Pipeline Problem HOT 2
- How to Ignore PDF processing, gzip, etc but still include them ? HOT 1
- JavaScript files are not working in Grails 4.0.1 and assets-pipline 3.0.11 from other directories or custom directories.
- Possibility to add custom response headers HOT 1
- asset:javascript tag doesn't work in IntelliJ GSP pages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grails-asset-pipeline.