1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Compress /js/xenforo/xenforo.js

Discussion in 'Server Configuration and Hosting' started by Andy.N, Jul 11, 2012.

  1. Andy.N

    Andy.N Well-Known Member

    I'm unable to compress this JS file using nginx. I see some xf installations with this issue and some don't.
     
  2. Andy.N

    Andy.N Well-Known Member

    Anyone?
     
  3. Luke F

    Luke F Well-Known Member

    Thought it might be a buffer setting but I don't have anything out of the ordinary set to non-default and it appears to work on my install

    Do you have the latest stable nginx?
     
  4. Andy.N

    Andy.N Well-Known Member

    I have nginx 1.3.3 and this on my config file
    Code:
    location /js/xenforo/ {
    gzip on;
    gzip_http_version 1.0;
    gzip_proxied any;
    gzip_types text/css application/x-javascript;
    gzip_vary on;
    }
     
  5. Luke F

    Luke F Well-Known Member

    Try setting gzip_http_version to 1.1.

    If other JS files are not being gzipped as well, try adding text/javascript to gzip_types
     
  6. Andy.N

    Andy.N Well-Known Member

    Thanks.
    It may have something to do with the Cloudfront pull zone I'm using.
    gzip is set to 1.0 for CF to work http://www.cdnplanet.com/blog/gzip-nginx-cloudfront/
    If I go to config.php and remove the Cloudfront CDN, it will work.
     

Share This Page