How to create a free CDN link in less than a minute?

How to create a free CDN link in less than a minute?

|
50

A CDN (aka content delivery networkis a server specifically to serve content faster, according to the location from where it is being accessed. I will show you the best trick how you can create a CDN link for css and js in less than a minute. So let's begin 💪.


Related Article: Why you should learn TypeScript and ditch JavaScript?


Get free CDN Link infographic

I'll quickly show you can get a free CDN of css and js within less than a minute. There are only 4 simple steps.

  1. Open codepen and login or signup
  2. Now create a new pen and paste your css and js code.
  3. Now save it to get a unique URL.
  4. Great! Now you've your CDN ready, just add .css at the end of the URL to get css CDN link and js for js CDN link.

What is a CDN?

content delivery network

Photo by NASA on Unsplash

CDN also called content delivery network by some nerds, smart people call it just CDN. Now, what is the idea behind it? Suppose you're sitting in Japan, and you're browsing a website which has its server on the US. So the data has to travel all the way from the US, so to reduce this time, website owner set up another server which will serve to the Asian countries, to reduce the data travel time. Like this, a whole network is set up to serve the data according to the user's nearest location, and this network is called a content delivery network.

Now as it is not possible for every site owner to set up all this, so there are companies who have their setup all around the world, and they provide CDN services. Now suppose you want to serve your CSS to someone, and you don't have a link to share, so you just put it on a CDN, and share the URL obtained from that CDN provider.

Here are the detailed steps along with the screenshot of every step along with the link of CDNs generated at the end.

1. Open Codepen and Signup/Login

Open the codepen.io and click on the login/signup.

Codepen login page

Codepen Login Page

2. Create a new pen

After logging in, create a new pen on clicking Pen on the left bar as shown below.

Create a new pen

Create a new pen

3. Add CSS and JS

Now add the css and js codes in their respective text boxes. And click save. After saving you'll get a unique URL as shown below.

saved pen

Saved pen

Now just copy the URL and append .css or .js at the end of the URL, and boom, you now have your lifetime free CDN links of css and js respectively.

CSS: https://codepen.io/sirajalam049/pen/yLOEeyQ.css
JS: https://codepen.io/sirajalam049/pen/yLOEeyQ.js



Comments

© 2021 Garbage Valuegarbage value logo