MyBB Community Forums

Full Version: Forum speed optimization
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello friends;

In terms of speeding up the community, someone knows how to fix the following:

1-Remove query strings from static resources

2-Defer parsing of JavaScript

Specify a cache validator-3

4-Use a Content Delivery Network (CDN)

5-Use cookie-free domains

Thanks.
I probably wouldn't worry too much about removing query strings. You can remove your scripts in headerinclude template and place them in footer to fix your second point, but this may render some functions on your forum useless, so move scripts 1 by 1 and test when doing so.

For cache validator read here.
- MyBB's CDN Documentation

I think using a CDN will give you the ability to have a cookie-free domain. Those site speed checks are generally built for websites and not for forums. I wouldn't worry too much about what can pop up. Best of luck Smile
Thank you very much for the description. Are there any other ways to increase the speed of the query?

Yes you can remove the query string from static resources. I asked the same question here:
https://community.mybb.com/thread-219360.html

I remove them and write them into the URL like this:
general-1818.min.js

It means more work for yourself though when it comes to upgrading. I wish MyBB would adopt that convention going forward.

2) Javascript there's not much you can do about. If you try to add async or defer in headerinclude, it will break your site in various places. This is probably due to the order the scripts need to run in.

I move all my javascript to the footer, but if you do this you need to go around to all your templates and move javascript down to preserve order. Again more work for you when you upgrade.

3) Cookie free domains is not high priorty on the GTmetrix list. And there can be a trade off if you only have a few static resources that you are going to move onto a static domain.

4) MyBB still has room for improvement. Global.CSS can be optimised. Not every piece of code therein needs to run on every webpage. So i break it apart and inline small pieces of style on pages where they need to go.