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

PageSpeed Insights Help

Discussion in 'Forum Management' started by ncbetz, Jun 19, 2016.

  1. ncbetz

    ncbetz Formerly Noah Betz

    Hello,
    I did a PageSpeed Insights for my website, and I was told to do a few things. Before I do them, I have a few questions:
    1. Will deleting from "render-blocking JavaScript and CSS in above-the-fold content" my XenForo root affect anything?
      1. "Your page has 4 blocking script resources and 6 blocking CSS resources. This causes a delay in rendering your page." How do I fix this?
    2. Where can I enable compression? Apparently I can get a 65% reduction.
    3. Apparently leverage browser caching would help. Where can I do this?
    Thanks,
    Noah
     
  2. ncbetz

    ncbetz Formerly Noah Betz

    Does this make sense? I am enabling compression and the expiration of a header. I want to make sure the below is correct before I upload it.

    Code:
    #    Mod_security can interfere with uploading of content such as attachments. If you
    #    cannot attach files, remove the "#" from the lines below.
    #<IfModule mod_security.c>
    #    SecFilterEngine Off
    #    SecFilterScanPOST Off
    #</IfModule>
    
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 405 default
    ErrorDocument 406 default
    ErrorDocument 500 default
    ErrorDocument 501 default
    ErrorDocument 503 default
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        #    If you are having problems with the rewrite rules, remove the "#" from the
        #    line that begins "RewriteBase" below. You will also have to change the path
        #    of the rewrite to reflect the path to your XenForo installation.
        #RewriteBase /xenforo
    
        #    This line may be needed to enable WebDAV editing with PHP as a CGI.
        #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        RewriteCond %{HTTP_HOST} !^www\.conservativeunderground\.io$ [NC]
        RewriteRule ^(.*)$ http://www.conservativeunderground.io/$1 [R=301,L] 
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>
    
    <IfModule mod_deflate.c>
      # Compress HTML, CSS, JavaScript, Text, XML and fonts
      AddOutputFilterByType DEFLATE application/javascript
      AddOutputFilterByType DEFLATE application/rss+xml
      AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
      AddOutputFilterByType DEFLATE application/x-font
      AddOutputFilterByType DEFLATE application/x-font-opentype
      AddOutputFilterByType DEFLATE application/x-font-otf
      AddOutputFilterByType DEFLATE application/x-font-truetype
      AddOutputFilterByType DEFLATE application/x-font-ttf
      AddOutputFilterByType DEFLATE application/x-javascript
      AddOutputFilterByType DEFLATE application/xhtml+xml
      AddOutputFilterByType DEFLATE application/xml
      AddOutputFilterByType DEFLATE font/opentype
      AddOutputFilterByType DEFLATE font/otf
      AddOutputFilterByType DEFLATE font/ttf
      AddOutputFilterByType DEFLATE image/svg+xml
      AddOutputFilterByType DEFLATE image/x-icon
      AddOutputFilterByType DEFLATE text/css
      AddOutputFilterByType DEFLATE text/html
      AddOutputFilterByType DEFLATE text/javascript
      AddOutputFilterByType DEFLATE text/plain
      AddOutputFilterByType DEFLATE text/xml
    
      # Remove browser bugs (only needed for really old browsers)
      BrowserMatch ^Mozilla/4 gzip-only-text/html
      BrowserMatch ^Mozilla/4\.0[678] no-gzip
      BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
      Header append Vary User-Agent
    </IfModule>
    
    <ifModule mod_expires.c>
         ExpiresActive On
         ############################################
         ## Add default Expires header
         ## http://developer.yahoo.com/performance/rules.html#expires
         <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
         ExpiresDefault "access plus 1 year"
         </FilesMatch>
         </ifModule>
     
  3. Anthony Parsons

    Anthony Parsons Well-Known Member

    You're giving page speed way too much time and concern. Usability is your first concern, and that score should be the only one you focus on. Anything 75+ is fine.
     
    =MGN=RedEagle likes this.
  4. ncbetz

    ncbetz Formerly Noah Betz

    I am at 43 for mobile and 53 for desktop.
     
  5. Anthony Parsons

    Anthony Parsons Well-Known Member

    Then you have bigger problems that render blocking scripts.
     

Share This Page