Local database reading edition
JAVA and FLASH--make them LOAD faster
Reconstructed from database records, not a captured original forum layout. Dates and display names are retained as recorded; timezone and real-world identity are not inferred. Historical advice, contact details and offers are not current. Original markup is shown as inert text.
Opening post
Sanjeet · 2001-02-23 20:48:41
Java, Flash - make them load FASTER!
So you want to create online video animations, stunning special
effects, great interactivity, sharp and beautiful graphics.
BUT... You want it to load FAST! So how do you do that?
Go thru the following and see how special effects which Java, Flash and wonderful graphics
offer for your site, without sacrificing quality, content or speed!
Java
====
Java adds great interactivity and additional functionality to your
websites. There are numerous chatrooms, special scripts (such as
special effects menus), sound effects and more that you can either
download or purchase for your website. BUT -- in many cases when
you put it on your site, you can speed it up even *further* by
doing the following!
Practically all browsers support something called a 'jar' file,
which allows you to 'compress' your files usually by 50% or more
(thus 50% faster!). However, not many people know how to do so.
Here is an easy method.
JAR files are essentially a '.zip' file. So what you do is 'ZIP'
all your .class files together (and call it, say, 'javafiles.zip').
Then, simply change the 'extension' (the .zip) to '.jar'. (Click on
the file name with your right mouse button, then click on 'rename',
and then rename the file (in this example) to 'javafiles.jar').
Then, you simply add this code "archive=javafiles.jar" into your
applet tag. I.e.,
<applet archive=javafiles.jar code=mainfile.class>
</applet>
And now -- it will load much faster depending on the compression,
which is usually 50-75% faster!
Flash
=====
Flash is another great way of adding animations to your website
(which is used more for demo 'movies' or an 'intro' to your website).
There's nothing worse than having a 500K or more flash animation
(which can take 2 minutes or more on a slow modem!). Thing is --
a lot of people make the same mistake over and over again, which
could be easily avoided.
A large flash file is usually due to large music files. Instead of
including 1 minute of recorded music, take an 'important chunk' of
it, and replay it over and over (say a 5 second sound bite that
sounds good). (You can usually find any good sound editor off the
net, and cut the 'good' segment, and then easily 'loop' it which can
be controlled in Flash!)
This is what a lot of 'techno' songs do (they have 2 or 3 different
beats overlayed, and keep playing over and over).
And thus, yet another 50% or more in saved downloading time!
Graphics
========
GIF Images
----------
There are two main file formats: JPEGs (which support over 16
million colors) and GIFs (which support 256 colors).
The advantage of GIFs is that you can create animated movies
(in some ways like flash, except small GIF animations are usually
faster), and banner ads. If you want GIFs to load faster, you can
use something called a 'GIF Optimizer' -- which simply means that
the series of images is made as small as possible so you do not
waste a lot of time downloading it!
With complex animations you can usually get 50% or more compression!
Another cool thing you can do is reusing images. So say for example,
you wanted to have a pattern of 'circles' for your header. (Say
10 circles, just for the sake of this example). Rather than have
one *large* image of 10 circles (which might be 10,000 bytes), simply
create *one* image of *one* circle, and include the text for the
circle image 10 times! (which is only about 2,500 bytes -- your HTML
code and the 1 image!) And thus you just saved about 75% in loading
time!
JPEG Images
----------
JPEGs are great for photographic images, and have something called
a 'compression factor'. Due to the way the picture is stored, you can
choose what quality you want.
Lower compression means higher quality (because you aren't
'compressing out' any information). Usually, with 15% compression
you do *not* notice any difference, but depending on the picture
you can even choose 50% compression and have it still look good!
Redesign Web Solutions
New Delhi, INDIA.
Source notes
MyCommunity/nandighosha.org.zip!/forum/tools/snitz_forums_2000.mdb
Table: FORUM_TOPICS + FORUM_REPLY · record IDs: 45