PDA

View Full Version : YSlow Improve vb load speed v1


fxdigi-cash
06-30-2013, 10:00 PM
Good day, mates,

This is a just a beginning of my journey to optimize vb to the max and possible load speed...

INFO: :
------------------------------------------------
This little code can increase both load speed and vb pages performance...

It works on all vb versions starting from vb3.x.x till vb5...

Read more about Yslow link (http://yslow.org/)

Note:
The first release to page optimization code v1

Installation:

All you have to do is copy the code below and add it to your .htaccess in the vb root,

make sure to test your vb load speed before doing that in order to know whether you did the above step right or not...

sites to test your vb load speed:

1- http://gtmetrix.com/
2- http://tools.pingdom.com/fpt/
3- Google Speed test (https://developers.google.com/speed/pagespeed/insights)

The code:

<IfModule mod_headers.c>
<FilesMatch "\.(bmp|css|flv|gif|ico|jpg|jpeg|js|pdf|png|svg|swf |tif|tiff)$">
Header set Last-Modified "Mon, 15 Feb 2013 00:00:00 GMT"
</FilesMatch>
</IfModule>


Uninstallation:
All you need is to remove the code if you didn't want to use it anymore.

make sure you take a copy of your .htaccess before you make any modification.


Please make as installed if you used it....

Thanks,

Nirjonadda
07-01-2013, 04:10 PM
Please can you make any plugin/mod for increase vb load speed without manual editing .htaccess files?

fxdigi-cash
07-01-2013, 04:21 PM
Please can you make any plugin/mod for increase vb load speed without manual editing .htaccess files?

Hi Nirjonadda

I can't make a plugin just for such a simple code... I have many reasons why...

1- Plugins decrease vb performance and effect on the speed load.
2- it may cause a conflict with other plugins or codes, that's why adding a code directly to .htaccess is a lot better and easier.

besides, I want to reduce the number of used plugin instead of increasing them since they are big issue on vb load speed... codes are always better for performance and speed ....

Cheers:)

Nirjonadda
07-01-2013, 04:33 PM
OK ! Does It increase high server load issue?

fxdigi-cash
07-01-2013, 04:51 PM
OK ! Does It increase high server load issue?

what does it mean? can you explain a little plz

maybe I didn't get you right, possibly you mean whether plugins affect heavy load....!!

if yes, then yes plugins always cause slower speed and bad performance to vb

Nirjonadda
07-01-2013, 04:54 PM
I had high load in my server, Can i get some benefit from this?

fxdigi-cash
07-01-2013, 05:04 PM
of course, you will notice the difference directly after you add this code to your root .htaccess.

As I mentioned in the main thread that this is to reduce the load on the vb pages.

also it will clear any error in the browser Header set... so 100% useful.

you can test your vb on google speed before and after adding the code and you will notice the difference. also you use the other recommended testing sites above to see the speed improvement...

I had high load in my server, Can i get some benefit from this?

sadiq6210
07-01-2013, 05:09 PM
This great code increased my website score in (Google speed page) from 59% to 84%
I wish you continue and release more improvements in this thread

Thank you :)

Nirjonadda
07-01-2013, 05:15 PM
Please can you tell me? I have a .htaccess file with default this code,where the YSlow code are need to add?

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName mysite.com
AuthUserFile /home/user/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/user/public_html/_vti_pvt/service.grp

davidg
07-01-2013, 05:17 PM
Did you read this (https://vborg.vbsupport.ru/showthread.php?t=267588) thread before posting fxdigi-cash

fxdigi-cash
07-01-2013, 05:24 PM
Here you are, mate...

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<IfModule mod_headers.c>
<FilesMatch "\.(bmp|css|flv|gif|ico|jpg|jpeg|js|pdf|png|svg|swf |tif|tiff)$">
Header set Last-Modified "Mon, 15 Feb 2013 00:00:00 GMT"
</FilesMatch>
</IfModule>

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName mysite.com
AuthUserFile /home/user/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/user/public_html/_vti_pvt/service.grp

Please can you tell me? I have a .htaccess file with default this code,where the YSlow code are need to add?

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName mysite.com
AuthUserFile /home/user/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/user/public_html/_vti_pvt/service.grp

fxdigi-cash
07-01-2013, 05:26 PM
Did you read this (https://vborg.vbsupport.ru/showthread.php?t=267588) thread before posting fxdigi-cash

I already did, but that thread is pretty useless. Yes, there is some useful things, but sadly not working anymore...

This is just the beginning my friend...:)

Nirjonadda
07-01-2013, 05:31 PM
Thanks ! Installed , I will update you with more details about Page Speed.

joeychgo
07-01-2013, 08:43 PM
No appreciable difference for me - tested with gtmetrix

addamroy
07-01-2013, 11:25 PM
According to Google Page Speed,
this hack increased my score from 83/100 to 85/100

Not much improvement, but it is an improvement.

bzcomputers
07-02-2013, 12:50 AM
This has already been covered here: https://vborg.vbsupport.ru/showthread.php?t=267588

...with lots more info and lots of .htaccess tweaks for all versions of vB.

Here is a good start for .htaccess tweaking:


# BEGIN Deny attempts to view the htaccess file.
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
# END Deny attempts to view the htaccess file.

# 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
Addtype application/javascript .js
</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
ExpiresByType application/javascript 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 application/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 VB5"
</IfModule>
</FilesMatch>
<FilesMatch "\.(rtf|rtx|svg|svgz|txt|xsd|xsl|RTF|RTX|SVG|SVGZ|T XT|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 VB5"
</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|o dg|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|DO CX|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|M OV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|ODB|ODC|ODF |ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|R AM|SWF|TAR|TIF|TIFF|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|X LW|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"
</IfModule>
</FilesMatch>
# End Browser Caching/Headers

CaneInsider
07-03-2013, 01:32 PM
Gave me a bump. Thanks

YOODA230
07-03-2013, 02:06 PM
one of the best code !

scottct1
07-03-2013, 04:20 PM
I cant use this as my servers use NGINX and dont support .htaccess. :(

creativepart
07-03-2013, 08:00 PM
What does YSlow have to do with this "mod?"

final kaoss
07-04-2013, 12:09 AM
Yes fxdigi, thanks for your contribution but this (and more) has already been added by me as bzcomputers pointed out. To be fair though, I can't take credit for all of that code. Thanks goes out to matty asia (http://www.vbulletin.com/forum/forum/vbulletin-4/vbulletin-4-questions-problems-and-troubleshooting/333733-mod-rewrite-friendly-urls-htaccess) & the plugin for wordpress w3 total cache (http://wordpress.org/plugins/w3-total-cache/).

If you like though, I wouldn't mind any extra ideas that you may have that you can contribute to my article (https://vborg.vbsupport.ru/showthread.php?t=267588) :)

Following the steps in my guide yields these results:
*With the latest test I've done for my forums, I get a score of 92
http://gtmetrix.com/reports/www.video-game-chat.com/lARNL8yu
*With regular sites (non forums) people can get on average 90 on pagespeed & 84 for yslow
http://gtmetrix.com/reports/www.odysseyofhyrule.com/dgY7xuqQ
*Here is a standard html page with not much javascript 98/85
http://gtmetrix.com/reports/www.odysseyofhyrule.com/NEUWGtPn

fxdigi-cash
07-04-2013, 06:27 PM
I cant use this as my servers use NGINX and dont support .htaccess. :(

For NGINX try the following code:


gzip_vary
syntax: gzip_vary on|off
default: gzip_vary off
context: http, server, location


make a test on the common browsers before and after adding the code...

since I don't have NGINX on my own, I can't confirm whether it is going to work 100% or not, but that should do the work anyways

fxdigi-cash
07-04-2013, 06:31 PM
According to Google Page Speed,
this hack increased my score from 83/100 to 85/100

Not much improvement, but it is an improvement.

it is a good start, possibly there is something else needs to be addressed in your codes such as css and js order arrangement or compressing images .....

you can upload an image here you use on your forum to show you how far I can shrink its size...:)

fxdigi-cash
07-04-2013, 06:33 PM
No appreciable difference for me - tested with gtmetrix

maybe you can try another tester like google speed page test...!! :)

fxdigi-cash
07-04-2013, 06:40 PM
What does YSlow have to do with this "mod?"

actually, it is not only Yslow, but Page Speed Grade. That means the higher grade your page is the better performance and faster loading you will have as well as your visitors ...

you need to speed up your forum pages as fast as possible so your visitors don't run away at first time visiting...

so in summery, we need ultimate speed to load pages and that happens by removing errors, avoiding bad requests, minifying css and js, combining css if possible and js as well, reducing images size to the smallest size or through using sprites.......

so this is one way to do the process... and I will share the rest soon if I got enough time...

Cheers

fxdigi-cash
07-04-2013, 06:55 PM
Thanks, final kaoss

I already know this very well. no need to thank me for anything as I don't expect it from anyone since I love sharing whatever I have.

The purpose of such thread is to bring the max, useful and powerful codes that can be used by site owners pro and beginners so that anyone can get the advantage...

do you think newbies for example will read you article or any article that has long story... NO WAY!!

Here I want to simplify things to all by slicing up codes and so on, and introduce basic knowledge on how to deal with vb codes mainly to newbies since they are the majority ...

I'm not denying anyone's right or anything and I know you guys did great job by introducing full procedure on how to speed up vb pages, but still not everyone will read long articles as people tend to go with short and useful tools.

I believe you got the point, mate.

Sorry for writing long,

Cheers,

Yes fxdigi, thanks for your contribution but this (and more) has already been added by me as bzcomputers pointed out. To be fair though, I can't take credit for all of that code. Thanks goes out to matty asia (http://www.vbulletin.com/forum/forum/vbulletin-4/vbulletin-4-questions-problems-and-troubleshooting/333733-mod-rewrite-friendly-urls-htaccess) & the plugin for wordpress w3 total cache (http://wordpress.org/plugins/w3-total-cache/).

If you like though, I wouldn't mind any extra ideas that you may have that you can contribute to my article (https://vborg.vbsupport.ru/showthread.php?t=267588) :)

Following the steps in my guide yields these results:
*With the latest test I've done for my forums, I get a score of 92
http://gtmetrix.com/reports/www.video-game-chat.com/lARNL8yu
*With regular sites (non forums) people can get on average 90 on pagespeed & 84 for yslow
http://gtmetrix.com/reports/www.odysseyofhyrule.com/dgY7xuqQ
*Here is a standard html page with not much javascript 98/85
http://gtmetrix.com/reports/www.odysseyofhyrule.com/NEUWGtPn

fxdigi-cash
07-04-2013, 07:04 PM
By the way, just to comment on your tests!

I got to say they are very good, but the first one has some issue with Specifing image dimensions... I don't see this part covered in your article anyways...!!

The 2nd one as well has the same issue and also sprites not being used, which was discussed in your article...

The 3rd one has an issue with images optimization, ...

eventually, your tests were great, but I don't know if newbies can follow you up on this, I mean to do the same as what you did...

Thanks for sharing.

Cheers :)

Yes fxdigi, thanks for your contribution but this (and more) has already been added by me as bzcomputers pointed out. To be fair though, I can't take credit for all of that code. Thanks goes out to matty asia (http://www.vbulletin.com/forum/forum/vbulletin-4/vbulletin-4-questions-problems-and-troubleshooting/333733-mod-rewrite-friendly-urls-htaccess) & the plugin for wordpress w3 total cache (http://wordpress.org/plugins/w3-total-cache/).

If you like though, I wouldn't mind any extra ideas that you may have that you can contribute to my article (https://vborg.vbsupport.ru/showthread.php?t=267588) :)

Following the steps in my guide yields these results:
*With the latest test I've done for my forums, I get a score of 92
http://gtmetrix.com/reports/www.video-game-chat.com/lARNL8yu
*With regular sites (non forums) people can get on average 90 on pagespeed & 84 for yslow
http://gtmetrix.com/reports/www.odysseyofhyrule.com/dgY7xuqQ
*Here is a standard html page with not much javascript 98/85
http://gtmetrix.com/reports/www.odysseyofhyrule.com/NEUWGtPn

final kaoss
07-04-2013, 07:12 PM
Thanks for the feedback but I'm certain that if they follow the article step by step as intended they can get through it easily.

It's not listed in the article yes but if users use google pagespeed service, image dimensions and many other things are handled by that service.

As for the issue with image optimizations please inform me of what issues you encountered.

I'll be sure to check up on how your efforts are doing every now & then. Good Luck!

fxdigi-cash
07-04-2013, 08:01 PM
Thanks for the comments.

I was referring to the images size. web designers are always concerned about image size since it is an essential key to load pages very fast... so if have some images with varied sizes say 2kb for 20 png image, it is going to be 40kb in total, and that will decrease the page loading speed. in this case we tend to use either sprites to avoid size issue or converting images from png to gif since gif away smaller in size.

I believe CDN (CloudeFlare, MaxCDN) is not an option for everyone to use in order to ultimately speed up vb or site pages.

Thanks

final kaoss
07-04-2013, 09:33 PM
Yes I can agree with that, that a cdn is not for everyone. I personally find them to be the most effective with vbulletin when they are only set to serve javascript & css.

If you use the visual studio plugin provided along with the free trial of VS, you can shave off kb's from images without changing the file extension and after that then yes, you most certainly can use sprites.

addamroy
07-04-2013, 11:23 PM
it is a good start, possibly there is something else needs to be addressed in your codes such as css and js order arrangement or compressing images .....

you can upload an image here you use on your forum to show you how far I can shrink its size...:)

Why not just show us all! lol

final kaoss
07-04-2013, 11:35 PM
using one of the tools provided in my article can do this easily as this picture of pngauntlet demonstrates. Sometimes there is not much gain but other times you can shave off quite a huge number of KB's from images.
https://vborg.vbsupport.ru/external/2013/07/65.png

Here's a sample image from my own usage of the tool:

fxdigi-cash
07-05-2013, 09:23 AM
Yes I can agree with that, that a cdn is not for everyone. I personally find them to be the most effective with vbulletin when they are only set to serve javascript & css.

If you use the visual studio plugin provided along with the free trial of VS, you can shave off kb's from images without changing the file extension and after that then yes, you most certainly can use sprites.

well said. Yes, true CDN is going to be the 1st choice for anyone who wants to pay, but CloudeFlare offers a free subscription, which is good to start with. I believe they are decent to some level. I might consider their paid service near future.

For sprites, the story is very long and it depends on how you divide your css to many or only one file. if one file then taking all images in consideration to use only one sprite would take long time especially if your forum is full of custom images...

fxdigi-cash
07-05-2013, 09:31 AM
Why not just show us all! lol

I would love it, but first I want to see the challenge :) and increase the excitement...

Ok, here is an image attached original and after shrinking in size...

notice that before.png is 1.3kb with 12x12px and then after compressing it (and renamed it as well), after.png is 429kb with 12x12px.....

for instance, it is much better than any compression tool... what you think???

perhaps I will open a topic for this just to avoid the distraction...

fxdigi-cash
07-05-2013, 09:33 AM
using one of the tools provided in my article can do this easily as this picture of pngauntlet demonstrates. Sometimes there is not much gain but other times you can shave off quite a huge number of KB's from images.
https://vborg.vbsupport.ru/external/2013/07/65.png

Here's a sample image from my own usage of the tool:

I like this tool, but still the one I use is away much better... let's test it and see more...

Paul M
07-07-2013, 08:45 PM
Moved to articles, this is not an add-on.

leanbulk
08-11-2013, 05:43 PM
Does this not work with vbseo? It actually slowed me down...

# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On

# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums/)
#RewriteBase /

#RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
#RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

<IfModule mod_headers.c>
<FilesMatch "\.(bmp|css|flv|gif|ico|jpg|jpeg|js|pdf|png|svg|swf |tif|tiff)$">
Header set Last-Modified "Mon, 15 Feb 2013 00:00:00 GMT"
</FilesMatch>
</IfModule>

RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron)
RewriteRule ^(.*\.php(/.*)?)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !\.(jpg|gif)$
RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php?vbseourl=$1 [L,QSA]

#php_value display_errors on
#php_value error_reporting 1

fxdigi-cash
08-17-2013, 07:14 PM
it should be working on all vb versions without any exception. you can post your site link or a test for it using http://gtmetrix.com to see what the issue is... :)


Does this not work with vbseo? It actually slowed me down...

# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On

# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums/)
#RewriteBase /

#RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
#RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

<IfModule mod_headers.c>
<FilesMatch "\.(bmp|css|flv|gif|ico|jpg|jpeg|js|pdf|png|svg|swf |tif|tiff)$">
Header set Last-Modified "Mon, 15 Feb 2013 00:00:00 GMT"
</FilesMatch>
</IfModule>

RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron)
RewriteRule ^(.*\.php(/.*)?)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !\.(jpg|gif)$
RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php?vbseourl=$1 [L,QSA]

#php_value display_errors on
#php_value error_reporting 1

tommythejoat
08-19-2013, 08:13 PM
Hi Nirjonadda

I can't make a plugin just for such a simple code... I have many reasons why...

1- Plugins decrease vb performance and effect on the speed load.
2- it may cause a conflict with other plugins or codes, that's why adding a code directly to .htaccess is a lot better and easier.

besides, I want to reduce the number of used plugin instead of increasing them since they are big issue on vb load speed... codes are always better for performance and speed ....

Cheers:)

Could you tell me how plugins increase load time? Our computer executes pretty fast and the additional envelope to get to the plugin code is small, is it not?

Are you saying that if I removed all the hooks in the vBulletin php files and replaced them with the set of plugins that execute under those hooks then the site would run faster?

Has anyone done any experiments on this and is the data published?

datoneer
09-10-2013, 09:35 PM
This is my htaccess file, where do i need to put the code?
#RewriteOptions inherit
# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On

# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums/

#RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.imspot\.org$
RewriteRule (.*) http://www.imspot.org/$1 [R=301,L]
RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap|api\.php)
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

RewriteCond %{QUERY_STRING} ^[0-9]+-([^&]+)
RewriteRule ^/?showthread\.php$ http://www.imspot.org/forums/topic/%1 [L,R=301]


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php [L,QSA]

fxdigi-cash
09-14-2013, 04:01 AM
Could you tell me how plugins increase load time? Our computer executes pretty fast and the additional envelope to get to the plugin code is small, is it not?

Are you saying that if I removed all the hooks in the vBulletin php files and replaced them with the set of plugins that execute under those hooks then the site would run faster?

Has anyone done any experiments on this and is the data published?

Hi, sorry to reply late ...

As I mentioned before that actually plugins slow down the vb board. you can try that yourself. All you need is to create new forum test without any plugin and compare with the one you have now that has plugins. in general plugins require a query most of the time that causes more stress and database slowing down...

That's why we try to avoid storing css files in the database and use the stored ones in the vb instead. In fact, using codes instead of plugins would certainly speed up the vb board. Remember that also good web hosting Co also play a roll in here to make things great eventually.

Alexa Traffic Rank plugin for Chrome browser can tell you whether you hosting load quality.

Good luck

--------------- Added 1379136582 at 1379136582 ---------------

This is my htaccess file, where do i need to put the code?

sorry to reply late, you could shoot me a pm as a reminder...

ok, your site doesn't need only this code, but more than that. you need to fix the following:

1- Add Expires headers, here:


<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
ExpiresByType application/javascript A2628000
</IfModule>



2- Compress components with gzip. you need to activate this function from your php.ini if you have Linux.

3- remove jquery.twitter.js and twitter.css since they are not found...

4- you have to remove Jquery scripts that are repeated. You have 3 of them, you need only 1 and no more... this will increase your vb loading time very noticeably.

5- combine the following css files together:
dbtech_vbshout.css,
dbtech_vbshout_colours.css,
dbtech_vbshout_editor.css,
notice.css,

And put all of them in additional.css, make your you have a copy of original files just in case. Then remove the css files mentioned above from the template through you vb Admin CP.

6- last, I noticed you have a lot of png images, so it is better and sure for super performance to cut down the size of the images by compressing them:

use http://compresspng.com/ for png images.

and use http://compressjpg.com/ for jpg images.

for example, I could compress your logo from 25K PNG to 8.3K PNG, which is amazingly by (-67%)

if you have any question, please let me know.

Good luck

friendlymela
07-21-2015, 03:51 PM
it will work on vb 4?

fxdigi-cash
07-26-2015, 10:38 PM
it will work on vb 4?

yes, sure it does. it works for both vb4 and vb3 without issues! :up: