I'm referencing my JavaScript files before the closing body tag, hoping they will be parsed last (as they're not needed until last). However when I analy开发者_如何学Cse activity with PageSpeed in Firebug, the images seem to be requested last.
How can I make the images higher priority than the JavaScript code?
When you execute your javascript commands in the onLoad-Event the images should be read first. After the page is fully loaded the onLoad-Event is executed.
Yes, document.ready
is before images. If you want it to run after images are loaded you need to use
$(window).ready(function() {});
Load your images outside of the $.ready() function
精彩评论