Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 4 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
YSlow Improve vb load speed v1
fxdigi-cash
Join Date: Jul 2012
Posts: 674

 

Show Printable Version Email this Page Subscription
fxdigi-cash fxdigi-cash is offline 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

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

The code:
PHP 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,
Reply With Quote
  #12  
Old 07-01-2013, 05:24 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here you are, mate...

Code:
# -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
Quote:
Originally Posted by Nirjonadda View Post
Please can you tell me? I have a .htaccess file with default this code,where the YSlow code are need to add?

Code:
# -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
Reply With Quote
  #13  
Old 07-01-2013, 05:26 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by davidg View Post
Did you read this 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...
Reply With Quote
  #14  
Old 07-01-2013, 05:31 PM
Nirjonadda Nirjonadda is offline
 
Join Date: Dec 2011
Location: Italy
Posts: 739
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks ! Installed , I will update you with more details about Page Speed.
Reply With Quote
Благодарность от:
fxdigi-cash
  #15  
Old 07-01-2013, 08:43 PM
joeychgo's Avatar
joeychgo joeychgo is offline
 
Join Date: Mar 2004
Location: Chicago, IL
Posts: 933
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No appreciable difference for me - tested with gtmetrix
Reply With Quote
  #16  
Old 07-01-2013, 11:25 PM
addamroy addamroy is offline
 
Join Date: Sep 2010
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

According to Google Page Speed,
this hack increased my score from 83/100 to 85/100

Not much improvement, but it is an improvement.
Reply With Quote
Благодарность от:
fxdigi-cash
  #17  
Old 07-02-2013, 12:50 AM
bzcomputers's Avatar
bzcomputers bzcomputers is offline
 
Join Date: Apr 2012
Location: TX
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

Code:
# 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|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 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|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"
        </IfModule>
</FilesMatch>
# End Browser Caching/Headers
Reply With Quote
Благодарность от:
fxdigi-cash
  #18  
Old 07-03-2013, 01:32 PM
CaneInsider CaneInsider is offline
 
Join Date: Sep 2010
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gave me a bump. Thanks
Reply With Quote
Благодарность от:
fxdigi-cash
  #19  
Old 07-03-2013, 02:06 PM
YOODA230 YOODA230 is offline
 
Join Date: Jun 2011
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

one of the best code !
Reply With Quote
Благодарность от:
fxdigi-cash
  #20  
Old 07-03-2013, 04:20 PM
scottct1 scottct1 is offline
 
Join Date: Mar 2002
Location: Connecticut
Posts: 391
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cant use this as my servers use NGINX and dont support .htaccess.
Reply With Quote
  #21  
Old 07-03-2013, 08:00 PM
creativepart creativepart is offline
 
Join Date: Jun 2006
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What does YSlow have to do with this "mod?"
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 09:29 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04954 seconds
  • Memory Usage 2,392KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (10)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete