I have seen a lot of people to use Dropbox as a content delivery network to serve static files such as CSS, JavaScript etc. But using Dropbox as a CDN can have many negative impacts for your website. I will show you how you can use dropbox as a CDN and why you should avoid it on your website.
Dropbox as CDN:
Dropbox is a very popular cloud storage solution. A lot of people love it for it's easy to use interface and fast performance. You can use Dropbox as a free content delivery network to serve static files on your website.
To use Dropbox as CDN first signup or login to your Dropbox account and upload your file under the public directory. For an example, I have uploaded the custom.css
file.
Now hover over the share icon and click on it. A popup window will open with a link. Copy this link with ctrl + c.
or copy to clipboard button.
Now open your website's index.html
file with your favorite IDE and link this dropbox URL to your website.
Now when you will open index.html
file in your browser, your browser will request this CSS file from dropbox. Dropbox has a limitation of 10 GB bandwidth for free users. But it's more than enough if you want to use it as
CDN. But it's a bad practice and here's why -
Dropbox file won't cache on the browser:
Generally, we use CDN so that our browser don't need to request same files again and again over the internet. CDN contents load at the first time when you visit a website and browser cache those files on your hard drive. It will load your website much faster on next visit because it's loading those static files from your hard drives.
But the bad news is Dropbox files won't cache on your browser. Every time when you navigate one page to another your browser will download all the statics files again and again which is a very bad user experience.
When the server returns a response, it also emits a collection of HTTP headers, describing its content-type, length, caching directives, validation token, and more. Dropbox doesn't return any caching directives information with this files.
Dropbox file takes a long time to load:
Yes, Dropbox is slow when you use it as a CDN. It doesn't matter how fast your internet connection is, Dropbox CDN files will take a long time to response. In my case, it took 1.21 second to deliver just a 4.8kb CSS file when other big files loaded on a very short time.
Conclusion:
Dropbox is great as a cloud storage. I personally prefer it over Google Drive. But if you want to use it as a content delivery network then probably it does not work as good as you expect. And it does make sense because Dropbox was not designed as a content delivery network. But still you can use it if performance is not in your concern.
So which CDN is BESt for my wordpress website?
ReplyDeletewww.anantvijaysoni.in
Hello
ReplyDeleteWe are conducting a small survey to find out which premium CDN products are preferred.
Please do not answer if you have not used at least one of them.
Please choose one of following product, you can see a list below:
Best CDN