Skip to main content

Don't Use Dropbox As CDN

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.

Dropbox as CDN
Dropbox as CDN

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.

Dropbox CDN Link
Dropbox CDN Link

Now open your website's index.html file with your favorite IDE and link this dropbox URL to your website.

Link Dropbox To CDN
Link Dropbox To CDN

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. 

Dropbox Won't cache
Dropbox Won't cache

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.

Dropbox Is Slow
Dropbox Is Slow

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. 

Comments

  1. Hello
    We 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

    ReplyDelete

Post a Comment

Popular posts from this blog

Play video while downloading it

You have decided to watch a movie. You go to your favorite movie download site and started downloading it. It will take 2 hours to complete the download. Probably, You will wait 2 hours to watch the movie. Right? Not anymore.You can download and watch the movie simultaneously.  Here's how. Essential software: Internet download manager VLC media player This trick should work on any downloader but I am using IDM here because it's the most popular download manager. I recommended VLC player. It works great in this situation. Other players may or may not work. Software settings: Open IDM and navigate to Download > Options . Now click on the "Connection" tab. Under the max connections number select "Default max conn. number" to "1" .  Its very important because by default IDM use 8 connection to download files from the server. It means IDM download your files on 8 part and when download finished IDM combine the 8 part. But it's im

Top Video Tutorials, Sites And Resources To Learn React

ReactJS was a trading technology of 2016 and 2017 is also a very good time to learn React. On a very short time, I have seen a lot of tech giant companies to move their web application on React. Facebook , Instagram , Dropbox , New York Times , Yahoo Mail and so many big companies are using React right now on production.

Essential Visual Studio Code Extension For Web Designer

Visual studio code is on of the most popular code editor for web designers and developers. It’s simple interface and variety of language support makes it so awesome. In visual studio code, you can use extensions to extend its functionality. There are thousand of extensions are available on visual studio marketplace. But I want to highlight 5 most useful extensions for web designer and developer that will increase productivity.