![]() |
VOOZH | about |
CDN stands for Content Delivery Network. It is a network that helps to speed up web page loading for web users. It is spread all over the world as usage of the internet is everywhere. It is basically a distributed system of servers that stores the data by the use of Amazon Web Services or Google Cloud storage and it serves that data to the user via the nearest server so that the loading or buffering of web pages is low.
A CDN operates through three key components:
When a user requests content, the DNS routes the request to the nearest edge server. If the cached copy is unavailable, the edge server fetches it from the origin, ensuring seamless content delivery.
A Content Delivery Network (CDN) improves web performance by reducing latency and speeding up content delivery. By distributing data across global servers, it ensures faster load times, lowers bandwidth usage, maintains high availability, and strengthens security against threats like DDoS attacks.
This example shows how to use a CDN to include jQuery in a webpage. It uses jQuery to add a paragraph to the page when it loads.
Output:
Explanation:
<script> tag fetches the jQuery library from Cloudflare’s CDN, ensuring faster loading and reduced server load.$(document).ready() ensures the JavaScript runs only after the webpage is fully loaded.$("body").append("<p>…</p>") inserts a paragraph into the webpage’s body.