Jump to content

Compression / image expiration

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 61
  • Created
  • Last Reply

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


Link to comment
Share on other sites

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?



Link to comment
Share on other sites

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!

Link to comment
Share on other sites

There are many options but most users use Cloudflare.


You can try it as it is free ^_^

What's included on free plan:

  • Fast site performance
  • Broad security protection
  • SSL
  • Powerful stats about your visitors
  • Peace of mind about running your website so you can get back to what you love

Check also the big network that they use around the world:


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :



Link to comment
Share on other sites

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 ....

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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....

Link to comment
Share on other sites

1 hour ago, BostonBob said:

Don't reach for google's speed test.  It actually doesn't rate speed. ^_^  It's kinda bogus test. 

Well no, not bogus this test. I think that the test GtMetrix is deceptively good.

Best online test has Dareboost. Google Developers test It is very close.

See you to your Dareboost test and you will see.


Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Step by Step :smile:

Add in your htaccess file:

FileETag None
<IfModule mod_deflate.c> 
<filesMatch ".(css|js|x?html?|php)$">
    SetOutputFilter DEFLATE
<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"


Link to comment
Share on other sites


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

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...