How do i know when should i use what and which one is preferred? I have tried using both and found that loading files through a CDN was giving me better loadtimes but i've seen articles online saying that downloading the files is a much better way. I am just a beginner please help.
Asked
Active
Viewed 1,489 times
-1
-
_“but i've seen articles online saying that downloading the files is a much better way”_ - and what _reasoning_ did those articles give for that? – CBroe Aug 11 '20 at 08:21
-
Both have pros and cons. https://www.google.com/search?q=use+cdn+or+local – Craicerjack Aug 11 '20 at 08:22
-
they said that downloading the files gives greater control and customization over what I would normally get via a CDN. – Reuben Fernandes Aug 11 '20 at 08:25
1 Answers
1
When you are in developing the site, it wouldn't matter if you download it and use. When you are up for production, CDN is better.
It will speed up the site(not drastically). When a browser loads a web page it reads the HTML file first. then it checks URL or CSS, javascript and images. If it is offline/on your server then it will ask your server to get CSS, javascript, images and fonts for bootstrap.
If you test your website with google web tool or any other page speed analyzer, CDN showed a better result.

Bhavesh Lohana
- 376
- 3
- 5