PDA

View Full Version : How to speed up webpage with 30 short audio files



zhaohx02
05-24-2010, 05:05 AM
Hello, everyone,
I have a problem now, there are many short audio files on one page(about 30 mp3 files per page, one mp3 file is only 30kB), I insert one Media player for one mp3, so I insert 30 Media player on one page. these Media players make the speed of opening webpages is very slow.
How to make opening webpage fast?
please help me.
my website is www.yayalearn.com (http://www.yayalearn.com)
Lucy

Collectors-info
05-24-2010, 08:34 AM
Could try 30 links on a page & have the audio files open in an iframe with a click on the link. You would have to have a page for each file.

zhaohx02
05-28-2010, 04:37 AM
Thank you.
I tried another method, use Dynamic HTML, it works well.

I insert a html code on the page:
<html>
<script>function DHTMLSound(surl) {document.getElementById("dummyspan").innerHTML="<embed src='"+surl+"' hidden=true autostart=true loop=false>";}</script><span id=dummyspan></span>
</html>

then insert 30 html codes on the page where I want those image which calls the function on demand when the image is clicked:
<html>
<img src="images/bar1.jpg" onClick="DHTMLSound('http://www.yayalearn.com/ch1/ch1pya002o.wma')">
</html>

the page open very fast.