Comments (6)
I'm not sure, because your response is missing the Vary: Accept-Encoding
header this module adds. Can you display both the request and response headers with curl
and more code, perhaps enough where we could run it?
from compression.
Thanks for your quick response. HTTP headers detail:
$ curl -v -I -H 'Accept-Encoding: gzip,deflate' localhost:4200/assets/vendor.js
* Adding handle: conn: 0x7fe999804000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fe999804000) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 4200 (#0)
* Trying ::1...
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 4200 (#0)
> HEAD /assets/vendor.js HTTP/1.1
> User-Agent: curl/7.30.0
> Host: localhost:4200
> Accept: */*
> Accept-Encoding: gzip,deflate
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< X-Powered-By: Express
X-Powered-By: Express
< Last-Modified: Sun, 06 Jul 2014 04:11:13 GMT
Last-Modified: Sun, 06 Jul 2014 04:11:13 GMT
< Cache-Control: private, max-age=0, must-revalidate
Cache-Control: private, max-age=0, must-revalidate
< Content-Length: 2436528
Content-Length: 2436528
< Content-Type: application/javascript
Content-Type: application/javascript
< Date: Sun, 06 Jul 2014 04:41:13 GMT
Date: Sun, 06 Jul 2014 04:41:13 GMT
< Connection: keep-alive
Connection: keep-alive
<
* Connection #0 to host localhost left intact
I'm trying to isolate it in a runnable app.
from compression.
Ah. HEAD
responses are not compressed, because they do not have content to compress.
from compression.
Bad example, changed to a GET
and behaves the same. Anyhow it does seem like an issue in my app, as it seems that index.js
is not the server that loads and I should edit. Thanks for your input!
from compression.
Like I said, the Vary: Accept-Encoding
is not in your response headers, which is added by this module, so there is something wrong with your app's setup. I cannot tell you more without having code to run from you, though.
from compression.
For the record,
module.exports = function(emberCLIMiddleware) {
var app = express();
app.use(compression())
should have been:
module.exports = function(emberCLIMiddleware) {
var app = express();
emberCLIMiddleware.use(compression())
Thanks for your help, sorry to bother!
from compression.
Related Issues (20)
- Setting Vary header although caching is disabled HOT 1
- "drain" event listener leak when using res.once("drain"); can't use res.removeListener("drain") HOT 3
- compresssion doesn't work ,the vue.txt is 2m HOT 2
- Content-Type: application/json; charset=utf-8 No effect HOT 2
- Question: Why this middleware HOT 2
- Corrupted compressed .js-files for Mac OS / Safari -clients HOT 11
- Is compression working when node server is running on a container? HOT 2
- middleware fails when the request has more than 1 values for accept-encoding header HOT 2
- Is compression result cached? HOT 1
- change Transfer-encoding HOT 1
- Why does the data size increase after compression HOT 1
- Force size to be a minimum... HOT 2
- Chunked encoding is broken after using this middleware HOT 1
- Using a current debug version HOT 1
- Deflate backwards HOT 7
- Compression instrumentation (before/after compression hooks) HOT 2
- Angular Not Compressing? HOT 2
- compression not working json payload HOT 6
- Crash when compressing characters like ū HOT 1
- Express returns a non-compliant HTTP/206 response when gzip is enabled HOT 9
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 compression.