Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
sasiko Posted July 9, 2016 Posted July 9, 2016 like how this site is doing using amazon cloudfront. can you do it via servers aswell? the latency are said to improve if you serve via .gz Quote Before serving a file from disk to a gzip-enabled client, this module will look for a precompressed file in the same location that ends in ".gz". The purpose is to avoid compressing the same file each time it is requested.
Jim M Posted July 9, 2016 Posted July 9, 2016 IPS4 will check to see if your server has it enabled and able to compress it then it will server gzip enabled files. If you aren't able to, please contact your hosting provider to ensure that your server is able to.
sasiko Posted July 9, 2016 Author Posted July 9, 2016 hi, thanks for your reply. i run nginx and have this in server block but it doesnt generate .gz location ~* /forum/uploads/(css|js)$ { access_log off; gzip_static on; expires max; add_header ETag ""; add_header Cache-Control "max-age=31449600, no-transform, public"; add_header Content-Encoding gzip; try_files $uri $uri/ /forum/uploads/index.php; } perhaps i did something wrong? HTTP/1.1 200 OK Server: nginx Date: Sat, 09 Jul 2016 03:22:06 GMT Content-Type: application/javascript Content-Length: 324558 Last-Modified: Sat, 09 Jul 2016 02:58:56 GMT Connection: keep-alive Vary: Accept-Encoding ETag: "57806870-4f3ce" Expires: Sun, 09 Jul 2017 03:22:06 GMT Cache-Control: max-age=31536000 X-Content-Type-Options: nosniff Accept-Ranges: bytes :method: GET:scheme: https:path: /forum/uploads/javascript_global/root_library.js.2f5d9c82956b1f5f3d21dd159f611a25.js?v=95f8d25421user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 PTST/285accept: */*referer: https://domainforum/login/?ref=aHR0cHM6Ly95dW9ubWFpLm1lL2ZvcnVtL211c2ljYm94Lw%3D%3Daccept-encoding: gzip, deflate, sdch, braccept-language: en-US,en;q=0.8cookie: ips4_IPSSessionFront=fhgo5e0b66ab8mdj8a9p45aqt0 content-encoding: gzip 1 hour ago, Jim M said: IPS4 will check to see if your server has it enabled and able to compress it then it will server gzip enabled files. If you aren't able to, please contact your hosting provider to ensure that your server is able to.
sasiko Posted July 9, 2016 Author Posted July 9, 2016 @Jim MMy server do have gz enabled But my forum still failed to generate js/css.gz. what am i doing wrong? i created my own css.gz compressed file and it could open the css file just fine. >curl -H "Accept-Encoding: gzip" -I mydomain.com/css.gzHTTP/1.1 200 OKServer: nginxDate: Sat, 09 Jul 2016 18:02:26 GMTContent-Type: text/cssContent-Length: 5353Last-Modified: Sat, 09 Jul 2016 17:55:47 GMTConnection: keep-aliveETag: "57813aa3-14e9"Expires: Sun, 09 Jul 2017 18:02:26 GMTCache-Control: max-age=31536000Content-Encoding: gzipAccept-Ranges: bytes
sasiko Posted July 9, 2016 Author Posted July 9, 2016 @Jim M again my server fulfills every critera that it can support.gz compression you can even test my static css that i linked on support ticket. the header content clearly say gzip System Check PHP Requirements PHP version 5.6.22. cURL extension loaded. Multibyte String extension loaded DOM extension loaded GD extension loaded MySQLi extension loaded OpenSSL extension loaded Session extension loaded SimpleXML extension loaded XML extension loaded XMLReader extension loaded XMLWriter extension loaded Phar extension loaded Zip extension loaded 700 MB memory limit. File System Requirements /home/yuon/domains/public_html/forum/applications is writable /home/yuon/domains/public_html/forum/plugins is writable /home/yuon/domains/public_html/forum/uploads is writable /home/yuon/domains/public_html/forum/downloads is writable /home/yuon/domains/public_html/forum/screenshots is writable /home/yuon/domains/public_html/forum/uploads/logs is writable MySQL Requirements MySQL version 5.5.5-10.1.14-MariaDB.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.