TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Optimize Javascript Pages

5 pointsby missenlinxalmost 17 years ago
I'm curious to know what everyone does to speed page load time when using fairly large frameworks like prototype or scriptacululous.<p>Now I understand the best solution would be to not use them but in my case this isn't an option.

4 comments

nickbalmost 17 years ago
1) Minify your JS: <a href="http://www.crockford.com/javascript/jsmin.html" rel="nofollow">http://www.crockford.com/javascript/jsmin.html</a><p>2) Combine it into one file: <a href="http://www.thinkvitamin.com/features/webapps/serving-javascript-fast" rel="nofollow">http://www.thinkvitamin.com/features/webapps/serving-javascr...</a><p>3) Gzip before delivering to clients<p>or...<p>use just Google JS API: <a href="http://ajaxian.com/archives/announcing-ajax-libraries-api-speed-up-your-ajax-apps-with-googles-infrastructure" rel="nofollow">http://ajaxian.com/archives/announcing-ajax-libraries-api-sp...</a>
评论 #209013 未加载
Rikalmost 17 years ago
A good option is to put the files at the end of the page. The page won't load faster but the rendering will be done earlier. The user will see a faster page.<p>Try to follow Yahoo! performance rules : <a href="http://developer.yahoo.com/performance/rules.html" rel="nofollow">http://developer.yahoo.com/performance/rules.html</a>
mnaganovalmost 17 years ago
Do lazy loading. Although it doesn't speed up loading really, it helps to create a smooth user experience.
STHaydenalmost 17 years ago
scriptacululous by default loads like 5 separate files. Only load the ones you need!!