Javascript CDNs and How To Use Them Offline
What are they and how do they help us?
Last week, I wrote an article about using Vue.js in an ASP.NET Core MVC web application. It was pretty easy to implement because instead of using build tools to create the front-end, all I had to do was include the CDN script in my existing app. However, while modifying my project, I kept wondering if there was a way you could use the CDN offline. So, today we are going to discuss what are CDNs, why would you use them, and how to use them in an offline environment.
What is a CDN?
Say you wanted to visit a website that is based in Europe. Sending your request to access that site across the Atlantic Ocean would take quite a long time. That’s where CDNs come into play. A CDN or Content Delivery Network is a geographically distributed group of servers that work together to reduce latency by closing the distance between you and the Internet content you are trying to access. Essentially, instead of sending that request across the ocean, you would instead be accessing a server containing a cached version of the site that is much closer to your physical location. Therefore, by being able to access that nearby server, access to the website occurs much more quickly.