jQuery was created in a far away 2006. At the time it was a huge time saver for many developers. Solving a lot of nasty crossbrowser issues, jQuery was a de-facto library in every new project.

Today browsers become smarter every day and the need of jQuery slowly fading. Many people tell it’s a good time to throw the library away claiming there is no place for jQuery in our modern world.

I think different and the article is about to tell you why.

jQuery costs size

I divide all the web page files in four categories:

Critical content — the first 100vh of the website (Must be delivered ASAP. E.g. the first screen on our awesome https://phoenix-startup.com💜) Main content — all the text, styles, pictures, videos user has come to see. Scripts — all your animations, forms submission and other pretty interactions. User possibly will use any of them. Other — ads, analytics, tracking. User doesn’t need any of it.

A typical website or webapp scripts (logic) is the 3rd category files.

This means user will need it after getting all the html, css and maybe some pictures.

Let me explain it a bit: after getting the page user will spend some time watching your content (text, pictues) decising what to do, where to click or where to scroll. That means plus 187ms* of background work doesn’t make any sense.

And, yeah. You can’t promise your jQuery-less code will perform much faster 😉

As a bonus a GUI tool to create your own build of jQuery: http://projects.jga.me/jquery-builder/

And the last but not the least. Try to fix your main loading speed and performance issues before starting to blame jQuery. Have a look on Google Chrome Dev Tools metrics, discover your server ping, optimize images (and automate it), kill unnecessary libraries etc.