Jump to content

Compression / image expiration


Recommended Posts

Posted

Enable compression and Leverage browser caching are the two main recommendations in red on my forum in google analytics. My home page only had a score of 49 :(

The main things it tells me is things such as this under Enable compression

Compressing http://www.mysite.co.uk/…0e4317516f62ad1849cd4fc1.js?v=36beede563 could save 244.4KiB (76% reduction).

The above link goes to forums/uploads/javascript_global/root_framework.js.f5fd60b20e4317516f62ad1849cd4fc1.js?v=36beede563

How come this isn't compressed, is it normal for it not to be? In 3.4 I know we have minify js options etc, does that still happen?

For leverage browser caching I have lots of messages for files in uploads/profile with  (expiration not specified) at the end

  • Replies 61
  • Created
  • Last Reply
Posted

The only way I solved this problem was to switch my CDN from Amazon Cloud to MaxCDN and let them handle the Cache issue on their backend.  Also, they have http/2 support so its unlimited streams with one open connection.  Once I did this, and did some other tinkering, I'm scoring a 98 / 94 on GTMetrix

.

Posted

CDN is useful if you have members around the world as they distribute your static content around the globe on the there network and when a user request an image for example from another country he will get it from a server from the CDN close to him.They can also minify css and js files .....

For the first part you can't do anything using the one and only server for your IPB.

For the second part why to get the load/network traffic of sending an image on a user and minify files if another one can do it better faster and free?

 

 

Posted

Well my server is based in the uk and 86% of my visitors are uk, should I be looking at a specific cdn or are they all much the same? Which is the best for quite a busy forum? I literally have no knowledge on this area!

Posted
On 26.07.2016 г. at 11:57 AM, marklcfc said:

Enable compression and Leverage browser caching are the two main recommendations in red on my forum in google analytics. My home page only had a score of 49 :(
 

Post a link to your site - any external test may suggest a solution.

Posted

I can create a post and reach IPB posting limit very easy talking about it ^_^

As i don't want to explain a lot of technical details for days i am just posting two links that you can read and one of it has info related to CDN's :

https://blog.wp-rocket.me/the-truth-about-google-pagespeed-insights/

https://premium.wpmudev.org/blog/why-trying-to-get-95-on-google-pagespeed-insights-will-drive-you-mad/?hpv=b&utm_expid=3606929-74.aeX0WyvtRVa7qMe8Ph5smw.1

Posted

My forum is 42/100 on mobile and 50/100 on desktop according to pagespeed insights, not good at all.

It was in the 70s before I upgraded to 4.1 from 3.4 last week

Posted

If you care about your forum performance you should start with the basics having the faster possible setup using for example:

NGINX - MARIADB - PHP-FPM (Multiple pools) - OPCACHE - MEMCACHED - PAGESPEED Module ........

Then optimize your system and network and kernel and all the above software....

Get a fast server and use a CDN.....

Optimize your images and you are almost done ^_^

Trying to satisfy google's developers numbers may not end and you may not get the performance gain that you think even if you improve them ....

Posted

I had Nginx before PHP 7 upgrade but I've been told I can't use Nginx with the current version of PHP 7 and Easy Apache 2.4. I also requested PHP-FPM, and was told cPanel isn't supporting it. and memcached but again the latest versions I have installed Easy Apache 2.4 doesn't support it?

Posted

One more reason to not use control panels ^_^

All the above can work on cpanel server !

But what they say i think is that they can't help you or point you to a related solution as they do not officially support it !

So you may try using Google search....

Posted

If I use opcache what do I need to select in advanced configuration > data storage as there is no opcache option listed. In other words, how do I set it up once my hosts enable it?

Posted

Also surely it's not normal to have such poor results in parsing of javascript etc? Is there a known solution to this problem that I'm missing? It was never so low on 3.4.

metrix.png

 

Posted
25 minutes ago, marklcfc said:

Also surely it's not normal to have such poor results in parsing of javascript etc?

Last night I you wrote to select JS  'Just before </body> tag'. Now I see that you have not done so. Is there a reason you do not do that?

Posted
2 minutes ago, Adlago said:

Last night I you wrote to select JS  'Just before </body> tag'. Now I see that you have not done so. Is there a reason you do not do that?

I have done that now ^_^ 

Posted

Step by Step :smile:

Add in your htaccess file:

FileETag None
<IfModule mod_deflate.c> 
<filesMatch ".(css|js|x?html?|php)$">
    SetOutputFilter DEFLATE
  </filesMatch>
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "now plus 1 week"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType application/x-shockwave-flash "access plus 1 week"
ExpiresByType video/x-flv "access plus 1 week"
ExpiresByType application/pdf "access plus 1 week"
ExpiresByType text/xml "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType font/woff "access plus 1 month"
ExpiresByType application/font-woff2 "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
</IfModule>

 

Posted

I will add that part now, I had to move the js back to head for now though as it messed my custom pages up :( 

Is that the .htaccess file in home or forums folder @Adlago?

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...