
Admin
Well-Known Member
Staff member
Administrator
There are several steps to improve your page loading speed. I will go over a few steps that will improve your site's loading time.
Step 1: Tweak your htaccess.
Open the htaccess file in your forum root and add the following below any url rewrite rules you may have from:
Vbulletin 3 or 4 with VBSEO installed
VB4 Forum Classic
VB4 Suite
VB3 by itself
This covers the following Pagespeed Rules.
Leverage browser caching
Specify a cache validator
Enable gzip compression
Make the following changes in your admincp
This helps to cache nearly any file type that you may add in your attachment options (if you allow people to upload music files, zip files, rar files etc.. see the list lol)
*some people report login problems, I have posted below what works for me. Be sure to do this step as well to avoid problems!!
http://www.vbulletin.org/forum/showthread.php?t=267588#3
Step 2: Combine Javascript and Minify Javascript & CSS and Minify HTML.
Not compatible with VB3
This covers the following PageSpeed Rules:
Minify HTML
Minify JavaScript
Minify CSS
Combine external CSS
Combine external JavaScript
Step 3: Optimize images
There is no more need to do this for vb4 packages unless you wish to do this on other images such as avatars, custom buttons, attachments, gallery uploads etc.
This covers the following PageSpeed Rules:
Optimize Images
If you have access to Visual Studio 2010 (grab the trial edition here which should be compatible with the addon), you can complete this step in just a few clicks using this addon
http://visualstudiogallery.msdn.microsoft.com/a56eddd3-d79b-48ac-8c8f-2db06ade77c3?SRC=VSIDE
You can also use pnggauntlet which will compress images as well.
This is great to use on new skins/themes and also non animated gifs for Smileys, Signatures, Photo Album & Group Images and Avatars that your forum stores on your server!
Step 4: Add CSS Sprites.
Not compatible with VB3
This covers the following PageSpeed Rules:
Combine images using CSS sprites
Step 5: Use a CDN
This is an optional step. Instructions can be found here.
Optional tweaks:
Install cloudflare to help deliver files. (it's recommended to disable rocketloader from cloudflare while leaving all of the other free options enabled!!)
Remove a css request (results in a 404 anyways from gtmetrix tests)
Do not remove additional.css if you have custom code from an addon or your own custom code.
Here's one additional trick to help improve your seo btw:
[SEO Enhancement] Replace "reload this page" to the thread title [v1.00]
Enjoy!
Consider linking to us at http://video-game-chat.com/forum to help show your appreciation, since you'll be saving bandwith, reducing the loading time and thus keeping more visitors who visit your site. And impoving seo as google is now factoring in loading times into it's algorithms.
Step 1: Tweak your htaccess.
Open the htaccess file in your forum root and add the following below any url rewrite rules you may have from:
Vbulletin 3 or 4 with VBSEO installed
VB4 Forum Classic
VB4 Suite
VB3 by itself
This covers the following Pagespeed Rules.
Leverage browser caching
Specify a cache validator
Enable gzip compression
Make the following changes in your admincp
Code:
Mod Rewrite Friendly URLs
From: Settings > Options > Friendly Urls: Select Mod Rewrite Friendly Urls
This helps to cache nearly any file type that you may add in your attachment options (if you allow people to upload music files, zip files, rar files etc.. see the list lol)
*some people report login problems, I have posted below what works for me. Be sure to do this step as well to avoid problems!!
http://www.vbulletin.org/forum/showthread.php?t=267588#3
Code:
# Author: Final Kaoss (aka: Extreme-Gaming)
# Version 2.7
RewriteEngine on
# This file is only needed if you have set the Forum Component URL in your admincp and you are
# using the mod_rewrite option for friendly urls. If this is the case, copy this file
# to your forum component stub directory.
# If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your forum component directory.
# RewriteBase /vbtest/
# If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off.
# Options -MultiViews
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# Forum
RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]
#Deny attempts to view the Htaccess file.
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
# BEGIN Browser Caching/Headers
<IfModule mod_mime.c>
AddType text/css .css
AddType text/richtext .rtf .rtx
AddType image/svg+xml .svg .svgz
AddType text/plain .txt
AddType text/xsd .xsd
AddType text/xsl .xsl
AddType video/asf .asf .asx .wax .wmv .wmx
AddType video/avi .avi
AddType image/bmp .bmp
AddType application/java .class
AddType video/divx .divx
AddType application/msword .doc .docx
AddType application/x-msdownload .exe
AddType image/gif .gif
AddType application/x-gzip .gz .gzip
AddType image/x-icon .ico
AddType image/jpeg .jpg .jpeg .jpe
AddType application/vnd.ms-access .mdb
AddType audio/midi .mid .midi
AddType video/quicktime .mov .qt
AddType audio/mpeg .mp3 .m4a
AddType video/mp4 .mp4 .m4v
AddType video/mpeg .mpeg .mpg .mpe
AddType application/vnd.ms-project .mpp
AddType application/vnd.oasis.opendocument.database .odb
AddType application/vnd.oasis.opendocument.chart .odc
AddType application/vnd.oasis.opendocument.formula .odf
AddType application/vnd.oasis.opendocument.graphics .odg
AddType application/vnd.oasis.opendocument.presentation .odp
AddType application/vnd.oasis.opendocument.spreadsheet .ods
AddType application/vnd.oasis.opendocument.text .odt
AddType audio/ogg .ogg
AddType application/pdf .pdf
AddType image/png .png
AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
AddType audio/x-realaudio .ra .ram
AddType application/x-shockwave-flash .swf
AddType application/x-tar .tar
AddType image/tiff .tif .tiff
AddType audio/wav .wav
AddType audio/wma .wma
AddType application/vnd.ms-write .wri
AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
AddType application/zip .zip
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css A2628000
ExpiresByType text/richtext A3600
ExpiresByType image/svg+xml A3600
ExpiresByType text/plain A3600
ExpiresByType text/xsd A3600
ExpiresByType text/xsl A3600
ExpiresByType video/asf A2628000
ExpiresByType video/avi A2628000
ExpiresByType image/bmp A2628000
ExpiresByType application/java A2628000
ExpiresByType video/divx A2628000
ExpiresByType application/msword A2628000
ExpiresByType application/x-msdownload A2628000
ExpiresByType image/gif A2628000
ExpiresByType application/x-gzip A2628000
ExpiresByType image/x-icon A2628000
ExpiresByType image/jpeg A2628000
ExpiresByType application/vnd.ms-access A2628000
ExpiresByType audio/midi A2628000
ExpiresByType video/quicktime A2628000
ExpiresByType audio/mpeg A2628000
ExpiresByType video/mp4 A2628000
ExpiresByType video/mpeg A2628000
ExpiresByType application/vnd.ms-project A2628000
ExpiresByType application/vnd.oasis.opendocument.database A2628000
ExpiresByType application/vnd.oasis.opendocument.chart A2628000
ExpiresByType application/vnd.oasis.opendocument.formula A2628000
ExpiresByType application/vnd.oasis.opendocument.graphics A2628000
ExpiresByType application/vnd.oasis.opendocument.presentation A2628000
ExpiresByType application/vnd.oasis.opendocument.spreadsheet A2628000
ExpiresByType application/vnd.oasis.opendocument.text A2628000
ExpiresByType audio/ogg A2628000
ExpiresByType application/pdf A2628000
ExpiresByType image/png A2628000
ExpiresByType application/vnd.ms-powerpoint A2628000
ExpiresByType audio/x-realaudio A2628000
ExpiresByType application/x-shockwave-flash A2628000
ExpiresByType application/x-tar A2628000
ExpiresByType image/tiff A2628000
ExpiresByType audio/wav A2628000
ExpiresByType audio/wma A2628000
ExpiresByType application/vnd.ms-write A2628000
ExpiresByType application/vnd.ms-excel A2628000
ExpiresByType application/zip A2628000
</IfModule>
<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
</IfModule>
</IfModule>
<FilesMatch "\.(css|CSS|)$">
<IfModule mod_headers.c>
Header set Pragma "public"
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
</IfModule>
FileETag MTime Size
<IfModule mod_headers.c>
Header set X-Powered-By "Step by Step guide to speed up your VB4 (forum only)"
</IfModule>
</FilesMatch>
<FilesMatch "\.(rtf|rtx|svg|svgz|txt|xsd|xsl|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|)$">
<IfModule mod_headers.c>
Header set Pragma "public"
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
</IfModule>
FileETag MTime Size
<IfModule mod_headers.c>
Header set X-Powered-By "Step by Step guide to speed up your VB4 (forum only)"
</IfModule>
</FilesMatch>
<FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SWF|TAR|TIF|TIFF|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
<IfModule mod_headers.c>
Header set Pragma "public"
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
</IfModule>
FileETag MTime Size
<IfModule mod_headers.c>
Header set X-Powered-By "Step by Step guide to speed up your VB4 (forum only)"
</IfModule>
</FilesMatch>
# End Browser Caching/Headers
Step 2: Combine Javascript and Minify Javascript & CSS and Minify HTML.
Not compatible with VB3
This covers the following PageSpeed Rules:
Minify HTML
Minify JavaScript
Minify CSS
Combine external CSS
Combine external JavaScript
Code:
For this step, we need to install [URL="http://www.vbulletin.org/forum/showthread.php?t=229608"]vb supercharged[/URL]. WARNING! Some people have reported conflicts when using this mod with other mod's. With Google Closure Compiler OFF, I have not encountered any conflicts!
My advice is to enable every option except for these:
Enable Html Optimiser
Enable Javascript Optimiser
Enable Attachment Optimiser
There is no more need to do this for vb4 packages unless you wish to do this on other images such as avatars, custom buttons, attachments, gallery uploads etc.
This covers the following PageSpeed Rules:
Optimize Images
If you have access to Visual Studio 2010 (grab the trial edition here which should be compatible with the addon), you can complete this step in just a few clicks using this addon
http://visualstudiogallery.msdn.microsoft.com/a56eddd3-d79b-48ac-8c8f-2db06ade77c3?SRC=VSIDE
You can also use pnggauntlet which will compress images as well.
This is great to use on new skins/themes and also non animated gifs for Smileys, Signatures, Photo Album & Group Images and Avatars that your forum stores on your server!
Step 4: Add CSS Sprites.
Not compatible with VB3
This covers the following PageSpeed Rules:
Combine images using CSS sprites
Code:
Install the addon [URL="http://www.vbulletin.org/forum/showthread.php?t=266696"]United-Forum CSS Sprites[/URL] and follow all of the instructions. Can be found in the sprite_0.6.3a.zip file.
This is an optional step. Instructions can be found here.
Optional tweaks:
Install cloudflare to help deliver files. (it's recommended to disable rocketloader from cloudflare while leaving all of the other free options enabled!!)
Code:
Cloudflare offers alot of helpful options to continue speeding up your forum/site. Here are some of the main things that should interest you.
[B]Caching Level[/B]
Adjust your caching level to modify CloudFlare's caching behavior. The basic setting will cache most static resources (i.e., css, images, and JavaScript). The aggressive setting will cache all static resources, including ones with a query string.
Basic: http://site.com/pic.jpg
Aggressive: http://site.com/pic.jpg?with=query
[B]Minimum Expire TTL[/B]
Specify how long CloudFlare-cached resources will remain on your visitors' computers. CloudFlare will honor any larger times specified by your server. A high value ensures faster load times for repeat visitors. However, a high value also means slower update times when those resources are modified. If you are unsure, four hours is a safe setting
[B]Rocket Loader™
(Web Optimization)[/B]
Automatically asynchronously load your JavaScript resources, resulting in faster page rendering. Rocket Loader™ handles both inline and external scripts, while maintaining order of execution. In manual mode, you designate which scripts for Rocket to load asynchronously. You can also override Automatic mode on a script-by-script basis. CloudFlare will detect incompatible browsers and disable Rocket's loader. Requires JavaScript.
Manual mode syntax: <script data-cfasync="true" src="/javascript.js"></script>
Note: data-cfasync must be the first attribute on the tag.
This feature is currently in beta!
[B]E-mail Address Obfuscation[/B]
Automatically scramble e-mail addresses on your web pages, thwarting bots from discovering and spamming them, while keeping them visible to humans. Requires JavaScript to decode.
[B]Always Online[/B]
Automatically enable always online for web pages that lose connectivity or time out. Seamlessly bumps your visitors back to normal browsing when your site comes back online.
Do not remove additional.css if you have custom code from an addon or your own custom code.
Code:
Open AdminCP and browse to:
Styles & Templates
Style Manager
Search in templates (for additional.css)
From there open headinclude_bottom in a new window (if you have multiple skins)
Remove {vb:cssfile additional.css}
Repeat for any other installed skins you may have.
Here's one additional trick to help improve your seo btw:
[SEO Enhancement] Replace "reload this page" to the thread title [v1.00]
Enjoy!
Consider linking to us at http://video-game-chat.com/forum to help show your appreciation, since you'll be saving bandwith, reducing the loading time and thus keeping more visitors who visit your site. And impoving seo as google is now factoring in loading times into it's algorithms.