YSlow is supposed to give you hints on what you could be doing better. I wouldn't take the grade all to seriously. You could also use Google's Pagespeed to get "a second opinion".
Even if you load modules asynchronously, you still have the additional http-requests and the overhead that comes with them. So when using AMD/ require.js you have to find the the right balance, I'd say. Loading 20 or so modules separately is probably not a good idea. You should check which ones could be bundled (in the build process). I don't know if you've already seen it, but there's an optimizer tool for require.js which might help you with this: http://requirejs.org/docs/optimization.html On 4 Nov., 00:29, dtang85 <[email protected]> wrote: > I'm using Require.js to load AMD modules and dependency scripts (like > plugins). Not all AMD modules are used on each page so I conditionally > load external scripts when those modules are present on the page. One > of my modules is using Google Maps API, which loads several other > scripts. When I run my site through YSlow, I get dinged on my score > because I have too many scripts loaded, despite them being loaded > asynchronously. Is there a way to tell YSlow that I loaded these > asynchronously, or am I doing something wrong? -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
