MyBB Community Forums

Full Version: Google Developers
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi to all i found this site and its very useful for forum owner here you can do a speed test, Google will offer fixes and defects of your website and that it would be desirable to fix.Now my question is how we can use it to improve Mybb.Thanks!!

https://developers.google.com/pagespeed/
To be honest, you are splitting hairs in the load difference. If you have a fast host, then your site can load in under 1.5 seconds fairly easily. And that's fast.
(2012-04-07, 07:49 AM)GamerVoid Wrote: [ -> ]To be honest, you are splitting hairs in the load difference. If you have a fast host, then your site can load in under 1.5 seconds fairly easily. And that's fast.

my site have result 71

but that not my question

when go to https://developers.google.com/pagespeed/ and do the test, you can see results with advice what you need to repair, for example java scripts and css.People who have not expirience whit codes dont know what and how to do it.That i ask for support

For example here

Suggestions for this page
Compressing the following resources with gzip could reduce their transfer size by 137.3KiB (76% reduction).

Compressing http://example.com/jscripts/prototype.js?ver=1603 could save 122.9KiB (77% reduction).
Compressing http://example.com/jscripts/general.js?ver=1603 could save 12.6KiB (72% reduction).
Compressing http://example.com/jscripts/popup_menu.js?ver=1600 could save 1.7KiB (65% reduction).

Minifying the following JavaScript resources could reduce their size by 43.6KiB (25% reduction).

Minifying http://example.com/jscripts/prototype.js?ver=1603 could save 39.1KiB (25% reduction).
Minifying http://example.com/jscripts/general.js?ver=1603 could save 3.9KiB (23% reduction).
Minifying http://example.com/jscripts/popup_menu.js?ver=1600 could save 665B (26% reduction).

128.9KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering.

http://example/jscripts/prototype.js?ver=1603 (114.3KiB)
http://example/jscripts/general.js?ver=1603 (11.5KiB)
http://example.com/jscripts/popup_menu.js?ver=1600 (1.8KiB)
http://example.com/index.php (785B of inline JavaScript)
As a warning, you should take suggestions given by this type of tool with a pinch of salt in my experience. They usually just tell you what's best for most sites rather than what will work specifically well for your site. Many of the suggested changes usually have no noticeable effect on page speed either.

Saying that, here are some tips to fix the 3 above suggestions.




1. To compress static files via GZip, place the following in a .htaccess file in your forum's root:

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# Or, compress certain file types by extension:
<files *.html>
SetOutputFilter DEFLATE
</files>



2. You can minify your JS files using an online tool such as this one. Simply upload all of MyBB's JS files and allow the site to compress them for you. Then simply download them and replace your standard MyBB JS files with the compressed ones.




3. This tip should especially be taken with a pinch of salt as making the change makes little to no difference in my experience. if you still wish to do it, try reading the following guide: http://www.websiteoptimization.com/speed/tweak/defer/
The point I was making in the post was that it isn't going to significantly speed up your forum, so it is not always worth the hassle.
I was also looking at this on the Page Speed site - I score above 90 on most pages so I am happy with that, but I was just curious HOW to get the scripts to the bottom/defer loading. It seems that everything I try breaks the site functionality.

I will have a look at that combined script tool as that is my biggest bottle neck - the sheer NUMBER of js scripts loading.
Due to the way MyBB works in some places, putting the JS at the bottom isn't completely possible unfortunately.
Thank you euantor - it's good to know that for once it wasn't me being totally thick Big Grin