Welcome to Centmin Mod Community
Become a Member

WebPerf Cloudflare This forum's pagespeed.conf

Discussion in 'Web Development & Web Performance' started by eva2000, May 26, 2014.

  1. tonmo

    tonmo Member

    50
    1
    8
    Jul 20, 2019
    Ratings:
    +5
    Local Time:
    6:23 PM
    1.17.1
    5.5.5 (10.3.16-MariaDB)
    I have, but I'm not sure about what drives the issue above. But it appears things are pretty well optimized here, I'm not sure I want to get into that level of tweaking (it's already pretty tweaked!).... I think I might turn to focus on CDN next:

    upload_2020-5-6_7-45-43.png

     
  2. Jon Snow

    Jon Snow Active Member

    766
    157
    43
    Jun 30, 2017
    Ratings:
    +225
    Local Time:
    7:23 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    @eva2000 I don't see webp supported on this forum when I right-click and copy image link.
     
  3. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:23 AM
    1.9.10
    10.1.11
  4. Jon Snow

    Jon Snow Active Member

    766
    157
    43
    Jun 30, 2017
    Ratings:
    +225
    Local Time:
    7:23 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    I do use Chrome.

    I'd use Safari if I had a Mac but they're too expensive for my taste and probably lack the power of what something else could provide for the price. And didn't know people still used IE.

    Are you seeing it when you grab the link of avatars? This site barely has any images to test on.
     
  5. eva2000

    eva2000 Administrator Staff Member

    53,209
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    8:23 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    forum uses Cloudflare Polish for webP now not nginx pagespeed so Cloudflare on the fly converts images to webP at the content mime type and not extension name so name remains as original format just the content type shows webP if converted. So right click and copying the file will have original file extension but actually be a webP image.

    type = webP for 1.jpg CF polish converted image

    upload_2020-9-15_15-34-15.png

    content mime type = webP for 1.jpg CF polish converted image

    upload_2020-9-15_15-34-44.png

    however, Opera browser when I save the 1.jpg is intend saved as 1.webp

    upload_2020-9-15_15-37-37.png

    just copied link remains as .jpg extension but CF polish converted it to webP with extension remaining the same

    Code (Text):
    https://community.centminmod.com/data/avatars/s/0/1.jpg?1451834511

    verify checking curl headers passing Accept header requesting webP image shows Content-Type = image/webp via Cloudflare Polish (Cf-Polished: qual=85, origFmt=jpeg, origSize=3514)
    Code (Text):
    curl -I -H "Accept: image/webp,image/apng,image/*,*/*;q=0.8" https://community.centminmod.com/data/avatars/m/1/1343.jpg?1521211919
    HTTP/1.1 200 OK
    Date: Tue, 15 Sep 2020 05:41:24 GMT
    Content-Type: image/webp
    Content-Length: 2494
    Connection: keep-alive
    Set-Cookie: __cfduid=d9e30e594bbb1d3b9b3700a6b78e519271600148484; expires=Thu, 15-Oct-20 05:41:24 GMT; path=/; domain=.centminmod.com; HttpOnly; SameSite=Lax
    CF-Ray: 5d3004ba2cb9e9b3-BNE
    Accept-Ranges: bytes
    Age: 614
    Cache-Control: public, max-age=86400
    Content-Disposition: inline; filename="1343.webp"
    ETag: "5aabda10-dba"
    Expires: Wed, 16 Sep 2020 05:41:24 GMT
    Last-Modified: Fri, 16 Mar 2018 14:52:00 GMT
    Vary: Accept
    CF-Cache-Status: HIT
    Cf-Bgj: imgq:85,h2pri
    CF-CacheTime: 86400
    Cf-Polished: qual=85, origFmt=jpeg, origSize=3514
    CF-Req-Country: AU
    cf-request-id: 0531e1485b0000e9b346102200000001
    Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
    X-Powered-By: centminmod
    Server: cloudflare
    alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
    
     
    Last edited: Sep 15, 2020
  6. Jon Snow

    Jon Snow Active Member

    766
    157
    43
    Jun 30, 2017
    Ratings:
    +225
    Local Time:
    7:23 PM
    Nginx 1.13.9
    MariaDB 10.1.31
    @eva2000 If I wanted to remove webp support from Nginx PageSpeed, would I comment out:
    Code (Text):
    pagespeed EnableFilters convert_jpeg_to_webp;
    pagespeed EnableFilters convert_to_webp_lossless;

    And restart nginx?
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,209
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    8:23 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    just comment them out with hash # in front to disable and restart nginx
     
  8. R0rke

    R0rke Member

    168
    22
    18
    Jun 2, 2016
    Iran
    Ratings:
    +37
    Local Time:
    3:23 PM
    2
    10
    is this compatible with XenForo 2.2?
    and also what if XenForo is installed on Directory
     
  9. frm

    frm Member

    34
    4
    8
    Dec 17, 2018
    Ratings:
    +6
    Local Time:
    7:23 AM
    1.15.7
    10.3.11
    No, it broke a few things so I disabled it as I didn't want to go through item by item to see which one was doing it.

    That said, if anyone finds a 2.2 working version... I'd be glad to copy/paste it! :-P
     
  10. eva2000

    eva2000 Administrator Staff Member

    53,209
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    8:23 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Probably way to test new web apps with ngx_pagspeed is going through your own troubleshooting steps and narrow down via ngx_pagespeed message logs which nginx pagespeed filters to enable and which URL paths to exclude as outlined at Nginx PageSpeed - Nginx Pagespeed Troubleshooting steps
     
  11. R0rke

    R0rke Member

    168
    22
    18
    Jun 2, 2016
    Iran
    Ratings:
    +37
    Local Time:
    3:23 PM
    2
    10
    what if xenforo is installed in directory how to only enable it on only one directory and ignore root directory
    Wordpress
     
  12. eva2000

    eva2000 Administrator Staff Member

    53,209
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    8:23 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    first post in this thread shows how to use pagespeed LoadFromFile and pagespeed Disallow to customise your path and URL path matches.

    you can also combine with leaving include files disabled in main nginx vhost and just add and enable them in location specific matches

    Code (Text):
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
     
  13. pdinh97qng

    pdinh97qng Member

    121
    15
    18
    Jan 24, 2016
    Ratings:
    +39
    Local Time:
    3:23 PM
    I used to really like pagespeed, but as of right now, I recommend using cloudflare. You don’t really have to deal with troubleshooting and they both try to approach the same thing. There are a lot of issues for page speed and XenForo. You will have to exclude a lot to get it worked properly. Cloudflare is a much better way and your server would have less stress. If you need the webp option, the Pro Plan also has that option.