Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Step by Step guide to speed up your VB4 OR VB3
final kaoss
Join Date: Apr 2006
Posts: 1,313

by final kaoss final kaoss is offline 28 Jul 2011
Rating: (6 votes - 4.17 average)

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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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/showt...php?t=267588#3

Browse to the bottom of this first post for the .htaccess code.

Step 2: 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.micr...77c3?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!

Please note that both of these methods produce lossless images, meaning that even though it uses various methods to decrease file size there is absolutely no visual loss in quality of the image.

For non-windows users, I suggest Imageoptim & Trimage

If you have alot of jpeg images, you can compress 10 per day with this jpegmini. Your other options with this tool are to upload jpegs to a jpegmini album which will compress the images for free which you can download soon after! Your other option is to buy the tool for $20, which will enable you to compress a unlimited amount of jpegs, although it won't compress images above 28 MegaPixels.



Optional Step 3: Add CSS Sprites.
Not compatible with VB3

This covers the following PageSpeed Rules:

Combine images using CSS sprites


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Optional Step 4: Use a CDN
Below are 3 free CDN's. I can vouch for cloudflare but have yet to try incapsula.

1) Incapsula
2) Cloudflare *Disable the Rocketloader feature to avoid potential issues.
New article on how to setup your forum for HTTPS with cloudflare

(Optional) Step 5: Make a free Server Optimization request

Now that you've done all of the steps above, there is one final thing left to do if you are using a vps or dedi, tweak the Server! You can go here to request a free tuneup:
http://www.vbulletin.com/forum/forum...-configuration

Here's one additional trick to help improve your seo btw:
[SEO Enhancement] Replace "reload this page" to the thread title [v1.00]

Enjoy!

Optional (Recommended) Step 7: Lazy load images.

Lazy Load will delay the loading of images outside of viewpoint to make the page load faster. That is, images in the visible part of the web page are only loaded and remaining images are loaded when visitor scrolls down the page, at some times it can even helps to save bandwidth.

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.

Test your page speed & yslow score's
If you would like to test your website and see what changes need to be made while you follow any part of this guide you can do so at several sites:

GTMetrix
Webpage Test
Pingdom

Here's a new htaccess that I've been testing, it's pretty solid so far. Simply throw in your url rewrite rules (for friendly urls).... this part may confuse people... they are usually located near the top of an existing htaccess file. Example of what rewrite rules look like...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Throw that in between the #add your friendly url rewrite rules below. lines and your set! Another identifier is to look to see if the threads, forums, members etc are being affected by any rules in the old .htaccess... if so.. throw that in and you should have no problems.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by final kaoss; 02 Mar 2018 at 18:57.. Reason: Revised the htaccess to make it fully compatible with any vbulletin setup
Views: 79442
Reply With Quote
Comments
  #2  
Old 28 Jul 2011, 23:48
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Real name: Brooks
Just a quick note, for the .htaccess, starting in 4.1.5

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

becomes

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
"Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time!"
"It's important to only think about what you desire, not what you fear to achieve your ultimate goal!!
Reply With Quote
  #3  
Old 29 Jul 2011, 00:15
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Fixing login issues with vbulletin 4.

found this recommendation about the login issue that you are experiencing. You may want to set the settings similar:
I would suggest you add your domains to your white list in vb options and then your cookies in vb and photopost set like this
cookie path /
cookie prefix bb
cookie domain .mysite.com
Example..
.www.vgchat.info

I have found that if I log into the front page the username is not showing at the top. However, if I login when checking a subforum, I am able to login successfully. I was also able to reply to the thread http://vgchat.info/forum/threads/166...me-3DS-Trailer without issues while being logged in.
After you apply the htaccess in the first post, proceed to do the following:

Disable vbulletin content caching (since apache is handling that now)

AdminCP > Options > Server Settings and Optimization Options > Disable Content Caching: Set to yes

*Note these changes did not show immediately for me but they did show that they were working for me after roughly 15 minutes.

Last edited by final kaoss; 17 Apr 2017 at 18:30.
Reply With Quote
  #4  
Old 29 Jul 2011, 14:11
Dirt Bike Addict's Avatar
Dirt Bike Addict Dirt Bike Addict is offline
 
Join Date: Apr 2010
Real name: James
Originally Posted by extreme-gaming View Post
Remove a css request (results in a 404 anyways from gtmetrix tests)


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Maybe rephrase that to only remove it if you haven't added any custom CSS.
Reply With Quote
  #5  
Old 29 Jul 2011, 14:12
final kaoss final kaoss is offline
 
Join Date: Apr 2006
True, most people however are unaware of it's presence.
Reply With Quote
  #6  
Old 29 Jul 2011, 19:33
Crotan's Avatar
Crotan Crotan is offline
 
Join Date: Feb 2010
Thanks, will be keeping an eye on this article, I just started tweaking my htaccess file for cache and wanted to look into compression as well.

Question though:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

What is this and where does it display?

Also does this require enabling mod rewrite friendly urls? in the admin control panel
__________________
Reply With Quote
  #7  
Old 29 Jul 2011, 21:00
final kaoss final kaoss is offline
 
Join Date: Apr 2006
That set's the etags.

And this part identifies what set it (can be changed) Header set X-Powered-By
Run a test at http://gtmetrix.com, click timeline, expand an element and you will see details about that request including X-Powered-By

No, it doesn't require enabling friendly urls in the admincp. You can still take advantage of the seo friendly urls by selecting this option in your admin cp.

Mod Rewrite Friendly URLs

Last edited by final kaoss; 30 Jul 2011 at 00:54.
Reply With Quote
  #8  
Old 30 Jul 2011, 07:27
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Real name: DRE
I set up Cloudflare last week.

I'll do the Supercharged mod today. I already have mod-rewrite friendly urls.
__________________
www.8thos.com
www.qapla.com
Reply With Quote
  #9  
Old 30 Jul 2011, 18:49
Crotan's Avatar
Crotan Crotan is offline
 
Join Date: Feb 2010
I think the caching of javascript doesn't play well with the login systen, in Firefox4 and IE9.

People will log in, it'll display the thank you for logging in, and then they will come back to a page that appears to have them not logged in. Either the caching or the compression not sure which.

Chrome seems to be unaffected
__________________
Reply With Quote
  #10  
Old 30 Jul 2011, 18:52
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Real name: DRE
Originally Posted by Crotan View Post
I think the caching of javascript doesn't play well with the login systen, in Firefox4 and IE9.

People will log in, it'll display the thank you for logging in, and then they will come back to a page that appears to have them not logged in. Either the caching or the compression not sure which.

Chrome seems to be unaffected
Yeah it's doing some weird stuff on my forum. I had to disable twitter style login.
__________________
www.8thos.com
www.qapla.com
Reply With Quote
  #11  
Old 30 Jul 2011, 19:06
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Hi crotan, is this with vb supercharged installed or did you install the htaccess only? I would have to say caching is the issue here imho.

Originally Posted by Crotan View Post
I think the caching of javascript doesn't play well with the login systen, in Firefox4 and IE9.

People will log in, it'll display the thank you for logging in, and then they will come back to a page that appears to have them not logged in. Either the caching or the compression not sure which.

Chrome seems to be unaffected

Last edited by final kaoss; 30 Jul 2011 at 19:14.
Reply With Quote
  #12  
Old 30 Jul 2011, 19:17
Crotan's Avatar
Crotan Crotan is offline
 
Join Date: Feb 2010
Originally Posted by extreme-gaming View Post
Hi crotan, is this with vb supercharged installed or did you install the htaccess only? I would have to say caching is the issue here imho.
just the htaccess on post #3, since I'm on 4.1.5
__________________
Reply With Quote
  #13  
Old 30 Jul 2011, 19:21
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Try removing these lines from it

AddType application/x-javascript .js
ExpiresByType application/x-javascript A31536000

Also, change this line

<FilesMatch "\.(css|js|CSS|JS)$">

to
<FilesMatch "\.(css|CSS)$">
Reply With Quote
  #14  
Old 30 Jul 2011, 19:29
Crotan's Avatar
Crotan Crotan is offline
 
Join Date: Feb 2010
Seem to still have issues, I took out


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This is now only.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

from the original


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

But still this htaccess interferes with the login of users on IE and Firefox :/
__________________
Reply With Quote
  #15  
Old 30 Jul 2011, 19:30
final kaoss final kaoss is offline
 
Join Date: Apr 2006
ok. At least now we know that caching isn't the issue here. Actually... first... I want you to clear your browser cache and try again with those lines removed.
Reply With Quote
Reply

Similar Article
Article Author Type Replies Last Post
Mini Mods Use Google Custom Search In Navbar - Step By Step rajubd vBulletin 4.x Template Modifications 104 29 Jul 2017 14:43


Tags
cloudflare


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:15.

Layout Options | Width: Wide Color: