need help with my website

hey guys…
i need help with my website:
it really gives me aheadache.
i don’t know how the hell can i enable the GZIP thing 100%
it is currently (73/100)…
and how can i defer the JS?
i always fail when i try to defer java scripts.
Any help will be greatly appreciated…
Here is my .htaccess :

[code]RewriteEngine On
RewriteCond %{HTTP_HOST} ^$
RewriteRule ^(.*)$$1 [L,R=301]

Header set Connection keep-alive
<FilesMatch “.(js|css|xml|gz)$”>
Header append Vary: Accept-Encoding

#The following line is enough for .js and .css
AddOutputFilter DEFLATE js css

#The following line also enables compression by file content type, for the following list of Content-Type:s
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml

#The following lines are to avoid bugs with some browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html 
mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_include mime ^application/javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* ## EXPIRES CACHING ## ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType application/javascript "access plus 1 year" ## EXPIRES CACHING ##[/code] Thanks in advanced.

You probably just have to add these missing file-content types:

Thanks for your help…
i really didn’t test if it was working or not because i have already tried this method for javascript:
Compressed JavaScript Compression | Perishable Press
and this one for css:
Compressed CSS Compression | Perishable Press
they seemed to have solved my problem.
Thanks again for trying :slight_smile:
you can see my pagespeed score here:

i now have one problem which seems unfix-able… which is the “Eliminate render-blocking JavaScript and CSS in above-the-fold content”… how can i fix it?
any help will be greatly appreciated…, Thanks again in advanced.

Depends on how much control you have over how the pages are generated.

Most JS file links do not belong in the . Move JS to just before the

If you cannot move the JS to just before the , you can try to add the ASYNC attribute

If you stay with XHTML use

DISCLAIMER: I have never used the following scripting method but have seen it used by programmers that seem to know what they are doing. The script is located before the

var js = document.createElement(‘script’);
js.type = ‘text/javascript’;
js.async = true;
js.src = ‘’;
var s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(js, s);

You should fix your HTML errors.

The table attributes used (e.g. align, cellpadding, cellspacing, cellspacing, nowrap) are obsolete. As is the font tag (e.g. )

You have a serious HTML Error, not to mention a table should not be used for formatting. You have a row terminator causing the subsequent and tags to generate HTML errors.

Line #221: Your Profile[color=#FF0000][/color]

Edit Your Details

Also some of your HTML is written for HTML DocTypes and you have a docType of XHTML 1.0 Transitional

about the "Move JS to just before the " i really tried that before… but it didn’t run well in the page… i will re-try the “async” as i don’t really know how it did end up actually last time

i tried replacing “”
with “” to test… and it didn’t work… :confused:
then i retried it with “” and still didn’t work…

Is your attempted JS changes generating any errors in the debug console?

It is not a matter of just cut and paste. the syntax changes when you move links to the

oh well
i tried getting them from the “headinclude” to the “announcement” Template.
and putted “async=“async”” once and the “async” in the other time… :

just to make you sure they are in the top of the but none of them WORKS. XD
btw…, i did try the thing… and i think that i manged to fix it… thanks for pointing that out to me… :smiley:
so do i also have any other HTML errors?

Considering these are Javascript libraries, you may not be able to get away with placing them in the section. If the page functionality breaks when you do, then apparently the script is needed to correctly render the page in the first place.

And unless you inline your CSS, you’ll always get that suggestion (they’re guidelines, not rules) from PageSpeed Insights. Fact is, there are many benefits to putting your style rules into a file, and these usually outweigh any benefits of inlining those rules on every page.

There’s no real value in attaining perfect scores, so try not to get hung up on that.

One more thing you could look into is combining commonly used images into a CSS sprite, and perhaps combining the two Javascript files into one file (doesn’t always work with these optimized libraries). Overall, though, performance looks pretty good.

Thanks alot for your reply…, i tried doing the “CSS sprite” thing in vB but i failed.
anyway of doing it?
i already have the files which needs to be putted in one image but… how to do that?
and is it easy?
if so… how?

Thanks again for everyone who have replied to my topic.

You use either image editing software like Photoshop or GIMP, or an online sprite generator (search for “css sprite generator”).

Some tutorials on creating and using CSS sprites:

oh well about that… i feel boring and don’t feel like to do it :confused:
as i love replacing images… and i think that it will take along of time to do that… XD
not to mention that i display my users images in the main page… (not static images) which means… :confused:
so lets keep it(the sprites thing) away for a moment.
what about inlineing the javescript in the html page? :o
will it be agood idea?
if so… then how can i inline this:

i mean… where will i give the inlined Javascript this value “$vboptions[simpleversion]”?
just to make you guys know… that “$vboptions[simpleversion]” includes numbers and letters(A-Z, a-z, 0-9) :confused:
path for the Javascript:
Thanks alot in advanced.

No, probably not. See: Why Inline CSS And JavaScript Code Is Such A Bad Thing

This site will create the sprite and generate the CSS.

Convert the images to base64
Use PHP’s base64_encode() to do the conversion.

Store the base64 text in the user profile record.

In the HTML:

You’ll significantly expand your HTML size with embedded BASE64-encoded images, not to mention the size of your database if your store them there, and they’ll have to be downloaded on every pageview as the images can no longer be cached.

oh well about that… the “BASE64” thing… i really don’t know if i shall do it or not as i am confused now. Not to mention that it will be kinda hard for me to do it :confused:
and i have found this page while googling in the vB forums but uses other version
is that necessary to use "base64_decode" function - vBulletin Community Forum
someone said that he should disable the script or code which dose the “base64” method as it is bad for security… i don’t really know if that is true or not as i haven’t read the whole page.

However…, is there anything else i must do other than the “CSS-Sprite” thing? because i think that it will take along time from me to do it :confused:
As i think that i must edit EVERY Template image’s in the website…
and vB uses alot of IF statements which i think means more images… :confused:

The point is…, what i really want to know atm is that… can i combine my JS files? :smiley:
and is there anyother html errors in the website? :confused: (i would be gladly happy if someone looked into it as i really don’t know how to find those errors… i was just right clicking my page source code in firefox and it used to show some red codes… i edited/fixed(i think) as much as i can but if there is more i will be very happy if someone manged to find them)
and about the avatars images…, should i leave them like that…? or can i compress them? and if it was the “BASE” thing… is there anyother safer way to do it?

Thanks alot guys…, and i am so sorry for wasting your time.

From my experience the additional storage for code64 over binary is about 7%. The base64 coding adds about 30-35% and compression takes that down to 7% overhead.

I have a multi-threaded forum test page with 500 comments each with a base64 40x40 jpeg avatar. It renders very quickly and perfectly on my WP8 Phone. My PHP /mySQL code generates the page (query, sort, format HTML and transmit) in just over 30 milliseconds.

The user perceived page load is less than 0.400 seconds, because I flush the output buffer after the and again after the topic article. Time to Document Complete: 0.911 seconds with 500 comments.

The base64 string length for each avatar averages 2,470 bytes giving about 1,235,000 bytes total.

[color=#FF0000]Base Page Size: 1,349,084 Bytes[/color]
Compression: 7.7X
HTML Whitespace: 0.4%
[color=#FF0000]Bytes Transmitted: 174,773 Bytes[/color]

[size=large]WPT Result summary[/size]
Page load time: 1.176 seconds
Time to first byte: 0.261 seconds
Time to Base Page Downloaded: 0.756 seconds
[color=#FF0000]Time to Start Render: 0.312 seconds[/color]
[color=#FF0000]Time to Document Complete: 0.911 seconds[/color]
Time to Fully Loaded: 1.176 seconds
Bytes sent out: 0.757 KB
Bytes received: 173.860 KB
DNS Lookups: 1
[color=#FF0000]Connections: 1
Requests: 2[/color]

OK Requests: 2
Redirects: 0

Not having enough storage for user profiles is a sign of success. A problem most would like to have to deal with.

so… how to do it in vB 3.8? and is it safe?
i am sorry for asking those 2 questions ^ (i guess that they sound a little rude but i really didn’t mean it.) As i am not good about these stuff :confused: (newbie)
and my English is bad(i am so sorry in advance).

Thanks again to everyone who have toke part into my problem. :slight_smile:

Edit: i have manged to make all the avatars images in a folder… i mean that i changed them from storing in database to storing as files.
so how would i be able to compress them automatically before loading? (most of them are GIF)

My point was was that while base64 images will significantly increase the size of the HTML that base64 is still a very viable solution in a forum environment… I know nothing about vB 3.8.

The forum site I referred to is my own creation. As you can see from the stats I posted, it is the World’s Fastest mulit-treaded discussion forum. And it uses base64 avatars.

Oh well, …blablabla(removed text)
Thanks alot.
i have manged to do it in php.
but sadly it slowed down my website rather than making it fast :confused:
So is there anyway else for my forum to be faster? even for ms? :smiley:
Thanks alot guys…, and i am so sorry again for wasting your time.