Benefits of CDN
- Fastest Delivery: It delivers the data very fast because of Edge servers that are spread all over geographical areas. It handles the web traffic which also helps in decreasing the page load time.
- Bandwidth cost: It reduces the bandwidth cost, as it provides the caching system which helps in maintaining the bandwidth consumption over the network.
- Availability: The Origin server stores all the data if any of the data gets updated the Origin server keeps track of that and updates that data immediately.
- Security: It provides all the security to the web pages. It has all the protection to prevent any security breach.
Example: This example shows the use of CDN for jQuery.
HTML
< html > < head > < title >The jQuery CDN example</ title > < script src = "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity = "sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin = "anonymous" referrerpolicy = "no-referrer" ></ script > < script type = "text/javascript" > $(document).ready(function () { document.write("Hello geeks from w3wiki!!"); }); </ script > </ head > < body > < h1 >Hello</ h1 > </ body > </ html > |
Output:
FAQs
1. Can CDNs handle dynamic content?
yes, CDN uses many techniques to handle the dynamic content that’s why it is able to serve fast page loading.
2. Are there any downsides to using CDN?
It can be inital setup complexity, potential cost, and some occasional challeneges comes with loading of dynamic content.
3. Can CDNs be used for streaming media?
Yes, It also play efficient role in streaming the media so that there should not be any buffering occurs between the streaming of the CDN.
4. How does CDN increase performance?
By providing the fastest page loading web pages, security, availibity of data all the time it increases the performance and customer experience towards CDN.
5. Can i use multiple CDNs simultaneously?
Yes, You can use multiple CDNs but there is a chance of conflict if two or many of them share the same resource and opposite features then there is a chance of redundancy and low performance.