Saturday, April 4, 2020

Using Microsoft OneDrive 2020 as Content Delivery Network (CDN) for images

For web developers who are mindful of Page Speed / YSlow scores, finding a free Content Delivery Network (CDN) to load your static content from a cookie-free domain is a nice to have!!!

This is a examination of using Micorosoft OneDrive as a possible CDN. I will test this using
https://onedrive.live.com to hosting a 
 4milliom.png 50.3 KB PNG image.   


Here's how to get the embed link for a resource on OneDrive. 



For more information on how to get a link to use in your website page for testing, read my blog entry on Microsoft OneDrive Direct File Download URL Maker.


Here's the file URL used in this anaylsis. 

https://wyztwg.by.files.1drv.com/y4mucnXH4ZIfty_kXg9nYvgjHKJMw-XkCLfcBvI7ipNMNidsCjSMyNcw4cFyNlB0WKO9M-VNquASIbFp9DlTJPrjpqk2ex4GmzoVcA_2OOAp1G1ZiGK_U_UPjmfTj_hmtd41HascgLLyjTbEKJlDzXfFhyOXPngJ_ovCRPxL14pt1B0er3HaJvRxjkpru0z85Wiua9JhMP-BvbADeKnISGTqQ

Now lets examine some network timings from Microsoft Edge Chromium Inspect window.





























We get 773.03 ms for this transfer, which is very good. Edge reports 5 cookies for this request. Disable cache for successive runs.

Now in Firefox, initial load was 1.3s, and successive load was 566ms. Firefox reports no cookies for this request. 
Disable cache for successive runs.



Conclusion


OneDrive can be used as an effective free Content Delivery Network (CDN) to load your static content. And this is faster than in 2016. 


No comments:

Post a Comment