-
Snippet
Fallback for CDN hosted jQuery
Several big companies offer copies of jQuery hosted on their CDN's (Content Delivery Network). Most notoriously Google, but also Microsoft and jQuery themselves. A lot of people swear by this since it saves bandwidth, downloads faster, and perhaps even stays cached jumping between different sites that use the same script.
There is always that twinge of doubt though, that perhaps something goes wrong with these big companies CDN at the script isn't available (it happens). It's more reliable to use … Read article
-
Article
New Poll: Large file on CDN or small file local?
The new poll is up (in the sidebar on the actual site, RSS folks) and it reads:
Would you rather host a 200k file on a major CDN or a 20k file self-hosted?
This requires a little explanation. … Read article
-
Article
Google CDN Naming Conventions (and You)
You've seen this before:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
This is a way you can load a JavaScript library like jQuery directly from Google's CDN (Content Delivery Network). You can get quick copy/paste access to these from ScriptSrc.net.
See in that above URL how it is pointing to 1.4.4 specifically? That little part of the URL can be tweaked. Perhaps you've seen it used that way before.
/1.4.4/ Loads this very specific version of jQuery which will never change. /1.4/ Today, -
Article
Adding and Leveraging a CDN on Your Website
If you’ve been working around web development for a while, you’ll know that the web has a need for speed. The truth is simple: speed matters and faster is considered better.
One "easy win" for increasing performance is using a CDN. We’ve discussed this several times at CSS-Tricks. It's easy in that you aren't rewriting a codebase or hand-editing content, but it's an area of performance many of us might overlook because, well, hosting, servers and cPanels, oh my!
Thankfully, … Read article
-
Article
Poll Results: Large file on major CDN or small file local
I quite enjoyed this poll because the results were so neck and neck. It was only in the last week or so that a clear winner has emerged. … Read article
-
Article
We Put Hundreds of Our Client Sites Behind a CDN, and It Worked Out Really Well
At the agency I work for, we recently put all ~1,100 of our sites behind a CDN. It seems to be working. Unfortunately, I have no idea why or how we did this. Therefore, in the first part of this article, I force our CTO, Joshua Lynch, to explain the process to me. This has the unintended consequence of Josh suggesting I try this on my own website, a process I'll narrate for the second half of the article.… Read article
-
Article
HTTP/2 – A Real-World Performance Test and Analysis
Perhaps you've heard of HTTP/2? It's not just an idea, it's a real technology and slowly but surely, hosting companies and CDN services have been releasing it to their servers. Much has been said about the benefits of using HTTP/2 instead of HTTP1.x, but the proof the the pudding is in the eating.
Today we're going to perform a few real-world tests, perform some timings and see what results we can extract out of all this.… Read article
-
Snippet
Fixing .load() in IE for cached images
The .load() function fires when the element it's called upon is fully loaded. It is commonly used on images, which may not be fully loaded when the JavaScript originally runs, and thus would return incorrect information about themselves (e.g. height/width). Most browsers deal with this fine. IE can cause problems, when images on the page are cached.
Selecting the image and changing it's src attribute to append a random parameter (based on the date). This will trick IE into firing … Read article
-
Article
Performance Tools
Weekend roundup time! From the multitude of Grunt and Gulp plugins to web apps that can help us visualize our websites with data, learning all the ins and outs of performance tooling is tough. I thought it might be useful to catalogue as many tools out there as I could find.… Read article
-
Article
Switching Your Site to HTTPS on a Shoestring Budget
Google's Search Console team recently sent out an email to site owners with a warning that Google Chrome will take steps starting this October to identify and show warnings on non-secure sites that have form inputs.… Read article