Join the community today
Become a Member

WebPerf Cloudflare This forum's pagespeed.conf

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

  1. RB1

    RB1 Active Member

    292
    75
    28
    Nov 11, 2016
    California
    Ratings:
    +122
    Local Time:
    7:28 PM
    Nginx 1.21.x
    MariaDB 10.1.x
    Have you experimented with insert_dns_prefetch?
    I assume it's only beneficial if you have lot of external resources from other domains.
    Any negative effects on loading speed for the website the visitor is already on?

     
  2. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:28 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    tried it but doesn't seem to work for me so manually set that up instead :)
     
  3. RB1

    RB1 Active Member

    292
    75
    28
    Nov 11, 2016
    California
    Ratings:
    +122
    Local Time:
    7:28 PM
    Nginx 1.21.x
    MariaDB 10.1.x
    Cool, I will give it a try. I do it manually most of the time too :)
     
  4. BobbyWibowo

    BobbyWibowo Active Member

    197
    42
    28
    Jul 30, 2015
    Indonesia
    Ratings:
    +71
    Local Time:
    9:28 AM
    1.17.x
    10.3.x
    True, I also tried insert_dns_prefetch a couple of times but it tend to miss various thingies.
     
  5. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:28 AM
    Mainline
    10.2
    Mine currently:

    Code:
    pagespeed RewriteLevel CoreFilters;
    
    pagespeed EnableFilters inline_google_font_css,trim_urls,remove_comments,collapse_whitespace,elide_attributes;
    pagespeed EnableFilters resize_mobile_images,lazyload_images,inline_preview_images,convert_to_webp_animated,dedup_inlined_images;
    pagespeed EnableFilters rewrite_style_attributes,rewrite_css,sprite_images,move_css_above_scripts,move_css_to_head;
    
    pagespeed DisableFilters defer_javascript;
    pagespeed InPlaceResourceOptimization off;
    pagespeed LazyloadImagesAfterOnload off;
    pagespeed AvoidRenamingIntrospectiveJavascript on;
    pagespeed PreserveUrlRelativity on;
    
    
     
    Last edited: Apr 10, 2017
  6. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:28 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    What's the logic behind disallow files and folders?

    I mean which way you decide to disallow a file or folder?
     
  7. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:28 AM
    Mainline
    10.2
    I don't want pagespeed to run on that URI.

    I don't want certain page to be optimize or broken with some filters.
     
  8. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:28 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  9. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:28 AM
    Nginx-1.25.x
    MariaDB 10.3.x
  10. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:28 AM
    Mainline
    10.2
    Try it yourself, just don't enable:
    • prioritize_critical_css
    • defer_javascript

    So no broken pages.
     
  11. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:28 AM
    Mainline
    10.2
    Does somebody here has working ngx_pagespeed under Cloudflare?
     
  12. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:28 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    should work fine.. my centminmod.com cloudflare mirror is at centmin.com with ngx_pagespeed enabled
     
  13. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:28 AM
    Mainline
    10.2
    My main site is not behind cloudflare.
    Only static files are served by CF.
    Static Files are not being rewrite for me.
     
  14. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:28 AM
    Mainline
    10.2
  15. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:28 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    whoops misconfiguration - i previously had some static files using keycdn but removed the reference and it reverted to centminmod.com instead of centmin.com - just fixed :)
     
  16. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:28 AM
    Mainline
    10.2
    Still static files on that site doesn't work with pagespeed :|.
     
  17. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:28 AM
    Mainline
    10.2
    X-Page-Speed header is being strip out by Cloudflare on static files :/.
     
  18. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:28 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    some static files i excluded from pagespeed but you have to reload page a few times for ngx_pagespeed to work as the backend for centmin.com is on centminmod.com's geodns cluster so load is spread over 16+ servers

    upload_2017-4-17_3-39-32.png

    X-Page-Speed header is only indicator - doesn't mean it isn't working

    upload_2017-4-17_3-40-26.png
     
  19. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:28 AM
    Mainline
    10.2
  20. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:28 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    the header can be hidden or removed and still have ngx_pagespeed work fine form my experience i.e. if you have a proxy like nginx proxy in front of nginx with ngx_pagespeed backends