HTML and CSS Reference
In-Depth Information
HTML5 Boilerplate comes with the latest stable version of jQuery, so you already
have that. If you are inclined to use other libraries such as jQuery UI, you can copy
them over to the libs folder.
Suppose you would like to use jQuery UI for your project, available at , then copy the latest version of jQuery UI to the libs folder and
then at the bottom of the markup in index.html , refer to it using the script tag.
Using a Content Delivery Network
By using a Content Delivery Network ( CDN ), we can reduce the number of re-
sources to serve on our web servers and by referring to resources that are univer-
sally hosted by Google or Microsoft, it is more likely that the file will be cached, as a
lot of other sites the user visits will also be referencing this particular resource.
If you paid close attention, you would have noticed that the source for the script that
links to jQuery is different from our jQuery UI source. This is for two reasons, which
are explained in the following sections.
Protocol-relative URLs
Typically most URLs that link to assets on the Web start with http:// . However,
there are occasions when the page is hosted on a server that uses encrypted com-
munication. So, your page will be served with https:// instead of the typical ht-
tp:// . Alas, as your script source is still referenced with the http:// protocol, IE
will throw a nasty dialog asking the following question to the visitors on your page:
You definitely do not want your visitors panicking over this. So, the easiest way to
prevent this is to remove the protocol ( http: ) part of the URL completely, as follows:
Search WWH ::

Custom Search