Live data from Hacker News

Stop Paying Your jQuery Tax

samsaffron.com

61–70 of 90 posts

Re: Stop Paying Your jQuery Tax

#61
post #30

This is clever. However, it depends on scripts using the shorthand notation for jQuery's ready method. Maybe it would be better form to use something explicit instead rather than doubling up $ operator.

true, we are used to using the shorthand notation in fact at SO we use a special internal variant called StackExchange.ready for a similar purpose, you could get $(document).ready remapped with a similar trick if you wanted, or you could simply push the inlines to the bottom as well.

Here's my attempt at the similar trick, covering all 4 possible ways to bind to DOM ready using jQuery: http://blog.colin-gourlay.com/blog/2012/02/safely-using-read...

Re: Stop Paying Your jQuery Tax

#62
This linked article is good: the Performance Golden Rule http://www.stevesouders.com/blog/2012/02/10/the-performance-...

(submitted days ago but got no traction)

For years we have been told that we will have to wait on the database so it doesn't matter how fast your implementation language is...

Well it's half true, depending on what you consider your implementation language: server side or client side.

Front end performance matters just as much (or by this article) more than "backend."

Re: Stop Paying Your jQuery Tax

#63

This linked article is good: the Performance Golden Rule http://www.stevesouders.com/blog/2012/02/10/the-performance-... (submitted days ago but got no traction) For years we have been told that we will have to wait on the database so it doesn't matter how fast your implementation language is... Well it's half true, depending on what you consider your implementation language: server side or client side. Front end per…

How does this (http://37signals.com/svn/posts/3112-how-basecamp-next-got-to...) get to be number one, while this http://www.stevesouders.com/blog/2012/02/10/the-performance-... goes nowhere?

Are we upvoting simply by name recognition?

http://stevesouders.com/about.php

He only wrote the book on high performance web sites...

http://www.amazon.com/High-Performance-Web-Sites-Essential/d...

Re: Stop Paying Your jQuery Tax

#64
post #37

Please go check out StackOverflow's source code before bandwagoning on this topic. This is shifting blame to the tools. The problem lies on StackOverflow's lacking design and not in jQuery. Pushing jQuery to the bottom of the page is trivial if you do proper HTML architecture. Pages should have only HTML. JS files only JS. JS files referenced at the very bottom of the body. Very simple. (if your asp/c#/* framework do…

>> Please go check out StackOverflow's source code before bandwagoning on this topic.

Please read the article before replying.

Re: Stop Paying Your jQuery Tax

#65
post #53
post #45

Earlier quoted context omitted.

Let's be clear ... I am not attacking jQuery here, just saying it is misuse to chuck it in the header and offering a practical mechanism to get out of a mess you create. I explain the cost of placing it in the header. I am not perfect, I make mistakes daily, I try to learn.

"Stop Paying Your jQuery Tax", that's an attention grabbing title with an attack on a free open-source project. It took you at least 20m to write that post, probably over an hour. You can't just say "oops".

I (not really a frontend web developer, though I've done a little bit of it) immediately went "oh, script loading in HEAD?" before even opening the article.

Most people, at least in this neck of the woods, use jQuery. Most people also put it in the HEAD and are susceptible to this sort of thing. "jQuery tax" is a succinct way of describing the phenomenon, and nobody's going to suddenly think less of jQuery because of it.

"An attack" on jQuery? Histronics.

Re: Stop Paying Your jQuery Tax

#66

This linked article is good: the Performance Golden Rule http://www.stevesouders.com/blog/2012/02/10/the-performance-... (submitted days ago but got no traction) For years we have been told that we will have to wait on the database so it doesn't matter how fast your implementation language is... Well it's half true, depending on what you consider your implementation language: server side or client side. Front end per…

How does this ( http://37signals.com/svn/posts/3112-how-basecamp-next-got-to... ) get to be number one, while this http://www.stevesouders.com/blog/2012/02/10/the-performance-... goes nowhere? Are we upvoting simply by name recognition? http://stevesouders.com/about.php He only wrote the book on high performance web sites... http://www.amazon.com/High-Performance-Web-Sites-Essential/d...

It's partly name recognition and partly novelty. The 37signals approach is unusual, while most competent front-end developers are already aware of the principles in Souders' post.

Re: Stop Paying Your jQuery Tax

#67

This linked article is good: the Performance Golden Rule http://www.stevesouders.com/blog/2012/02/10/the-performance-... (submitted days ago but got no traction) For years we have been told that we will have to wait on the database so it doesn't matter how fast your implementation language is... Well it's half true, depending on what you consider your implementation language: server side or client side. Front end per…

How does this ( http://37signals.com/svn/posts/3112-how-basecamp-next-got-to... ) get to be number one, while this http://www.stevesouders.com/blog/2012/02/10/the-performance-... goes nowhere? Are we upvoting simply by name recognition? http://stevesouders.com/about.php He only wrote the book on high performance web sites... http://www.amazon.com/High-Performance-Web-Sites-Essential/d...

Sounders post is 5% halfheartedly evangelizing (maybe not-so) common knowledge and 95% reiterating his point about the split between frontend/backend time on fulfilling a request.

After reading it I'm pretty sure it could eliminate all but the last graph and be just as valuable at 1/4 the length. That he did a rather comprehensive evaluation is commendable, but I think the post loses track of its main point in favor of sailing the sea of data that was collected.

Re: Stop Paying Your jQuery Tax

#68
post #37

Please go check out StackOverflow's source code before bandwagoning on this topic. This is shifting blame to the tools. The problem lies on StackOverflow's lacking design and not in jQuery. Pushing jQuery to the bottom of the page is trivial if you do proper HTML architecture. Pages should have only HTML. JS files only JS. JS files referenced at the very bottom of the body. Very simple. (if your asp/c#/* framework do…

Another telling gem is StackOverflow page doesn't even have a proper encoding declaration.

They declare the encoding in the HTTP Response.

  Content-Type:text/html; charset=utf-8
That's totally proper. If you specify it again inside the HTML, are you gaining anything?

Re: Stop Paying Your jQuery Tax

#69
post #57
post #54

Earlier quoted context omitted.

Did we read the same article? I didn't see this as an attack on jQuery at all. Furthermore, he didn't even blame any tools! He blamed the platform because as usual, the web platform itself is indeed the problem . "...developers coming from the backend who don't take web development seriously." That's because client side web development is a joke. It's a really bad one too compared to a nice native kit. The people who…

I hate the whole web paradigm but it's what's in use and it's definitely improving. And in particular, jQuery makes it less painful so that's what many of us use (or similar JS frameworks). The same problem happens at the low end with the x86 instruction set. Yet we live with it. None of that makes it OK to write a bashful title that should've read "Stop paying your ASP MVC JS tax" or something. It all comes down on…

'None of that makes it OK to write a bashful title that should've read "Stop paying your ASP MVC JS tax" or something. '

"Bashful" means "shy," not "full of bash," as you seem to think. Actually, I wonder if you speak English natively as you seem to be the only person who interpreted the article the way you did.

Re: Stop Paying Your jQuery Tax

#70
post #37

Please go check out StackOverflow's source code before bandwagoning on this topic. This is shifting blame to the tools. The problem lies on StackOverflow's lacking design and not in jQuery. Pushing jQuery to the bottom of the page is trivial if you do proper HTML architecture. Pages should have only HTML. JS files only JS. JS files referenced at the very bottom of the body. Very simple. (if your asp/c#/* framework do…

>> Please go check out StackOverflow's source code before bandwagoning on this topic. Please read the article before replying.

If you read my comment you'll see I addressed exactly the topics (document ready and caching).
Post reply on HN