Speeding up java script loading

R

Rich

I inserted a java scritp program on a web page. It shows
a series of photos. It takes forever to load before
starting, even on broadband. Any way to speed up the
loading?

Thanks,
Rich
 
S

Steve Easton

Does it have a preload image routine where it waits until all images are loaded before it
displays the first one??

If so, remove the preload routine and have the script go straight to the first image.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
G

Guest

Thanks, here is the code if that will help.

Rich

<APPLET CODE=DS_ClockWipe.class width=131 height=115
align="left" hspace="0"><PARAM NAME=credits
VALUE="Applet by Dario Sciacca
(www.dseffects.com)"><PARAM NAME=image1
VALUE="smilingcouple.jpg">
<PARAM NAME=image2 VALUE="happyfamily.jpg"><PARAM
NAME=image3 VALUE="happychild2.jpg"><PARAM NAME=image4
VALUE="smilinglady.jpg">
<PARAM NAME=image5 VALUE="couple1.jpg"><PARAM NAME=image6
VALUE="smilingolderman.jpg"><PARAM NAME=image7
VALUE="smilingblackman.jpg">
<PARAM NAME=image8 VALUE="smilinggirl2.jpg"><PARAM
NAME=image9 VALUE="smilingboygrass.jpg"><PARAM NAME=speed
VALUE="2">
<PARAM NAME=pause VALUE="2"><PARAM NAME=bgcolor
VALUE="ffffff"><PARAM NAME=interactive VALUE="out">
<PARAM NAME=overimage VALUE="ds.gif"><PARAM
NAME=overimagex VALUE="10"><PARAM NAME=overimagey
VALUE="10">
<PARAM NAME=overtext1 VALUE="OPEN HEARTS OPEN MINDS
OPEN DOORS"><PARAM NAME=overtexty1 VALUE="4">
<PARAM NAME=overtextspeed1 VALUE="1"><PARAM
NAME=overtextcols1 VALUE="d60000"><PARAM
NAME=overtextstyle1 VALUE="BOLD">
 
S

Stefan B Rusynko

That is JAVA applet code - not JavaScript
- JAVA has no preload
- JAVA may not be available to many users



| Thanks, here is the code if that will help.
|
| Rich
|
| <APPLET CODE=DS_ClockWipe.class width=131 height=115
| align="left" hspace="0"><PARAM NAME=credits
| VALUE="Applet by Dario Sciacca
| (www.dseffects.com)"><PARAM NAME=image1
| VALUE="smilingcouple.jpg">
| <PARAM NAME=image2 VALUE="happyfamily.jpg"><PARAM
| NAME=image3 VALUE="happychild2.jpg"><PARAM NAME=image4
| VALUE="smilinglady.jpg">
| <PARAM NAME=image5 VALUE="couple1.jpg"><PARAM NAME=image6
| VALUE="smilingolderman.jpg"><PARAM NAME=image7
| VALUE="smilingblackman.jpg">
| <PARAM NAME=image8 VALUE="smilinggirl2.jpg"><PARAM
| NAME=image9 VALUE="smilingboygrass.jpg"><PARAM NAME=speed
| VALUE="2">
| <PARAM NAME=pause VALUE="2"><PARAM NAME=bgcolor
| VALUE="ffffff"><PARAM NAME=interactive VALUE="out">
| <PARAM NAME=overimage VALUE="ds.gif"><PARAM
| NAME=overimagex VALUE="10"><PARAM NAME=overimagey
| VALUE="10">
| <PARAM NAME=overtext1 VALUE="OPEN HEARTS OPEN MINDS
| OPEN DOORS"><PARAM NAME=overtexty1 VALUE="4">
| <PARAM NAME=overtextspeed1 VALUE="1"><PARAM
| NAME=overtextcols1 VALUE="d60000"><PARAM
| NAME=overtextstyle1 VALUE="BOLD">
| <B>Sorry, no java browser</B> </APPLET>
|
| >-----Original Message-----
| >Hi Rich,
| >
| >I'm guessing the script preloads all the images? In
| which case you'd need
| >to either optimise the images to get their file size
| down or load them as
| >needed - here's an example of 1 way to do this
| >http://www.roksteady.net/scroll/examples/cars/index.html
| >
| >If you give us the url to your page we can help more
| >
| >--
| >Cheers,
| >Jon
| >Microsoft MVP - FP
| >
| >
| message
| >| >> I inserted a java scritp program on a web page. It
| shows
| >> a series of photos. It takes forever to load before
| >> starting, even on broadband. Any way to speed up the
| >> loading?
| >>
| >> Thanks,
| >> Rich
| >
| >
| >.
| >
 
K

Kevin Spencer

In addition, a Java Applet does not consist of the tags in the page any more
than an image consists of the image tags in the page. The tags which were
pasted into anonymous's message are simply instructions regarding the
location of the Java class files (which may be large in size, I can't say as
I have never seen them), and the parameters to use on the client side. So
now, in addition to downloading all those images, the browser must download
the class file(s) for the applet.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
S

Steve Easton

Have you resized the images you're using to the actual size displayed by the applet, which is:
width=131 height=115

If you haven't and your using 600 by 800 or larger images it will take forever for the images to
download.

Check the actual size and the file size for the images and if they're bigger than needed, Resample /
Resize them with an image editor such as the free IrfanView.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
R

Rich

Thanks so much I'll give it a try.
-----Original Message-----
Have you resized the images you're using to the actual
size displayed by the applet, which is:
width=131 height=115

If you haven't and your using 600 by 800 or larger
images it will take forever for the images to
download.

Check the actual size and the file size for the images
and if they're bigger than needed, Resample /
 
K

Kevin Spencer

BTW, you CAN pre-load images using JavaScript (much faster than using a Java
Applet). Just Google for scripts.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top