I am requesting a html5 web page it contains images and sound files. Once all the images and sound files loaded i want to hide a preloader using style property. How do I know last resource loaded for a web page request so that I can hide the preloader?
Note: Here is my situation, I dont use any ajax call it’s a normal webpage request.
I am requesting a html5 web page it contains images and sound files. Once
Share
The
loadevent fires when all files have finished loading from all resources, including ads and images. This link ( http://ie.microsoft.com/testdrive/HTML5/DOMContentLoaded/Default.html ) from IE9 testdrive demonstrate diffenence betweenloadevent andDOMContentLoadedevent (not supported in IE8-).As result:
loadevent and display preloader message.loadevent occur then browser execute your load-event-handler in which you can hide preloader message.