开发者

same flash file (.swf) downloaded multiple times on a page

开发者 https://www.devze.com 2023-01-03 23:30 出处:网络
I have a page that has a table with each row corresponding to an audio file. The last cell in each row embeds a simple flash audio player. The problem is that the flash file for the player is being do

I have a page that has a table with each row corresponding to an audio file. The last cell in each row embeds a simple flash audio player. The problem is that the flash file for the player is being downloaded for each row separately and as soon as rows go beyond 40-50 it crashes the browser.

I tried using different players (1pixelout, 开发者_C百科flash-mp3-player) and the problem is still there, so its not a player specific issue.

Is there any way to cache the player so that it is only downloaded once?

screenshot alt text http://www.freeimagehosting.net/uploads/cf33bb26f2.png


Swf file with same properties should be cached in first place, you probably pass parameters to it thus the download of all instances. I'm not sure you can use one player to play 50 files the same time. try to use the smallest player you can find and set it's autoplay option to 0 or false. So player will be downloaded but file won't be played until user clicks on it.

I have page with 100 images on it, each image is about 50KB and it works fine for all users with internet above 750Kbit. So reduce player size or even write your own which has only play and stop button on it (should be about 2-5KB for each instance) and make it load file on user click.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号