Nine errors that jQuery developers should pay attention to _ jquery

Source: Internet
Author: User
Tags html5 boilerplate
JQuery developers should pay attention to nine errors. If you use jquery, you can refer to jQuery is so easy to use that sometimes we just forget that it's not CSS. while using CSS, we don't have to give much thought to performance, because it's so fast that it's not worth the effort to optimize it. but when it comes to the real world, jQuery can drive developers crazy with performance issues. sometimes you lose precious milliseconds without even noticing it. also, it's so easy to forget about some functions and we keep using the old (and not-so-good) ones.

Let's take a look at a few of the most-common-and-easiest-to-fix mistakes while using jQuery in your projects.

1. You aren't using the latest jQuery version
Each version update means higher performance and several bug fixes. the current stable release is 1.7.2, and I'm pretty sure you know about plenty of sites developed using 1.6 and below. OK, OK, you can't just update every old site for every jQuery update (unless your client is paying you to do so) but you shoshould at least start using it for your new projects. so, forget about this local copy and just grab the latest release every time you start a new project.

2. You aren't using a CDN-hosted copy of jQuery
How many unique visitors you 've got last month? I bet the number is still under 1 billion, right?
So you 'd better use Google's copy of jQuery instead of yours. if your user still has the cached file of Google's website (or from your other sites that uses its CDN) his browser will just get the cached version, improving a lot your website's performance. you can use it by copying & pasting this HTML:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.