Current time: 12-17-2017, 12:57 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need help with my website
12-09-2013, 04:07 AM
Post: #11
RE: need help with my website
oh well about that.. i feel boring and don't feel like to do it :/
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.. :/
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:
<script type="text/javascript" src="clientscript/vbulletin_global.php?v=$vboptions[simpleversion]"></script>
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) :/
path for the J http://multigaming.co/clientscript/vbulletin_global.php
Thanks alot in advanced.
Find all posts by this user
Quote this message in a reply
12-09-2013, 04:28 AM
Post: #12
RE: need help with my website
No, probably not. See: Why Inline CSS And JavaScript Code Is Such A Bad Thing
Find all posts by this user
Quote this message in a reply
12-09-2013, 11:03 PM
Post: #13
RE: need help with my website
This site will create the sprite and generate the CSS.

http://instantsprite.com/
Find all posts by this user
Quote this message in a reply
12-10-2013, 01:21 AM
Post: #14
RE: need help with my website
(12-09-2013 04:07 AM)malis2007 Wrote:  so lets keep it(the sprites thing) away for a moment.

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:
<img class="pic" width="40" height="40" alt="Username" src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD... jxZVZwfKmf/Z">
Find all posts by this user
Quote this message in a reply
12-10-2013, 02:42 AM
Post: #15
RE: need help with my website
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.
Find all posts by this user
Quote this message in a reply
12-10-2013, 06:54 AM
Post: #16
RE: need help with my website
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 :/
and i have found this page while googling in the vB forums but uses other version
http://www.vbulletin.com/forum/forum/vbu...e-function
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 :/
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.. :/
--------
The point is.., what i really want to know atm is that.. can i combine my JS files? Big Grin
and is there anyother html errors in the website? :/ (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.
Find all posts by this user
Quote this message in a reply
12-11-2013, 08:09 AM
Post: #17
RE: need help with my website
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 </HEAD> 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.


Base Page Size: 1,349,084 Bytes
Compression: 7.7X
HTML Whitespace: 0.4%
Bytes Transmitted: 174,773 Bytes

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

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.
Find all posts by this user
Quote this message in a reply
12-11-2013, 08:36 PM (This post was last modified: 12-12-2013 07:11 AM by malis2007.)
Post: #18
RE: need help with my website
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 :/ (newbie)
and my English is bad(i am so sorry in advance).

Thanks again to everyone who have toke part into my problem. 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)
Find all posts by this user
Quote this message in a reply
12-12-2013, 02:26 PM
Post: #19
RE: need help with my website
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.
Find all posts by this user
Quote this message in a reply
12-21-2013, 12:31 AM (This post was last modified: 12-22-2013 05:37 AM by malis2007.)
Post: #20
RE: need help with my website
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 :/
So is there anyway else for my forum to be faster? even for ms? Big Grin
Thanks alot guys.., and i am so sorry again for wasting your time.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)