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.

The only script in your head

258 pointsby timfover 14 years ago

10 comments

dinedalover 14 years ago
I wish it was just the script loading and the other stuff was in a separate library. For a script that purposes to make less loading times I find it ironic that it would also throw in the kitchen sink.
评论 #1955440 未加载
评论 #1955355 未加载
评论 #1955723 未加载
评论 #1955660 未加载
评论 #1956168 未加载
评论 #1955357 未加载
评论 #1956543 未加载
评论 #1955359 未加载
CWIZOover 14 years ago
The idea seems nice, I'd have to test it out to actually see if it really delivers. One thing that bugs me tho is the tone of the text. It's all "this is the best thing since sliced bread" and "authors surly must be at least demi-gods". This comment in the page's source says it all really:<p>"headjs :: possibly the most important script after jQuery"<p>I'm all for cocky and confident attitude, I just think it has no place in a presentational web page/docs
评论 #1955694 未加载
评论 #1956726 未加载
Sephrover 14 years ago
I don't understand the whole dynamic class selectors for "Screen size detection". If it's trying to add support for standards, it should support media queries instead.
评论 #1956549 未加载
Grieverover 14 years ago
I've been reading up alot on javascript loaders lately to see which one I should use in the webapp I'm currently building.<p>So far I'm checking out LABjs, RequireJS and now apparently headjs. Unfortunately I am not so sure which will suit me best. Has anybody had any luck with any of the aforementioned three?
评论 #1955540 未加载
forgotAgainover 14 years ago
If most of your javascript is made up of libraries like jQuery wouldn't it be simpler to use a free CDN like Google or Microsoft so that the library is most likely already on the user's machine? That would appear to be have a better payback than adding another library to load.
评论 #1957570 未加载
kqueueover 14 years ago
IMHO, websites should include a single js file. In development you can have 100 js files, but in production these should be combined into a single file.<p>The downside is that you might include things you don't need in all pages, but that's not an issue because the file is transferred once, and cached. This will also minimize future conditional GET requests that check wether the cached file has changed or not.
评论 #1958834 未加载
tjarrattover 14 years ago
I've wanted something exactly like this for a while now. Looking forward to trying this in a few projects over this next week.
tonysknover 14 years ago
RequireJS does this and includes a module system for managing dependencies. It is also available as a JQuery plugin.
adamstacover 14 years ago
Logged. <a href="http://lg.gd/46" rel="nofollow">http://lg.gd/46</a>
aarontover 14 years ago
Very interesting. Will have to try this for some of my projects.