New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the <head>? #79
Comments
It's better at the end of the page, right before the closing |
Head or bottom: The only difference between putting in head and putting @bottom is, that if you are calling yepnope from head the scripts are loaded in front of other resources, which means your behavior is faster attached as content images and css images. If you put it @ bottom, first content images are loaded and then your scripts. What is best for you, really depends on what you are doing. If you have a lightbox, it is fine to put @bottom, if you are using tabs or accordions, it might be better to use from head. And if your site doesn't work without JS, you should really start your scripts as soon as possible. (There is also another technique to call scripts right after the header of website...). combined or uncombined: I also would suggest, that you simply try it and look into your network panel of Firefox and decide yourself, what is important, what is better in case of your site. (I really like AOL Pagetest for IE8 to look the network waterfall). |
Call |
@aFarkas @SlexAxton Thx—that's super helpful! |
Is this a stupid idea: run the yepnope at the bottom of the head in a setTimeout 0. The idea is that the yepnope js execution would now not block the page load, and the browser can start loading scripts while it is waiting to load content images. |
Oh nevermind, that is probably basically how yepnope already works. |
It still has to parse all the code regardless, and yepnope is that heavy. I'd bet you'd see better performance without the |
Is it better performance-wise to use Yepnope in the
<head>
or at the end of the page?If you had a Yepnope call in each of those locations would it be better to combine them both into one call in the
<head>
?The text was updated successfully, but these errors were encountered: