Question

I know that similiar questions were asked thousands of times, but none of the solutions meet exactly what I need. My scenario is as follows: I developed an online quiz which basically consists of a java-script, a css-file and a html-file that contains many images and some audio files. The online quiz works, but is very slow, since all the media consumes up to 15mb space.

How can I pre-load all the media files (images & audio) ? I don't want to list all individual image names in a array - there must be a way that pre-loads the media on the basis of an "id" or "class" or the "tag-type"?

Was it helpful?

Solution

Presuming you have a list of named media files stored on the server than you can only load or preload them by name anyway. If the quiz asks the questions in some predefined order then you could preload the next media file while the current question is being answered.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top