I have an HTML5 game that I would like anyone on the internet to be able to access. However, when I give a link to the page, it just prompts to download the file instead of rendering it.
How do I serve webpages from dropbox?
It was great while it lasted, folks. Dropbox has ended support for serving HTML files as of today for Basic users.
Dropbox Basic (free) users: Beginning October 3, 2016, you can no longer use shared links to render HTML content in a web browser. If you created a website that directly displays HTML content from your Dropbox, it will no longer render in the browser. The HTML content itself will still remain in your Dropbox and can be shared.
Dropbox Pro and Business users: Beginning September 1, 2017, you can no longer render HTML content.
I believe you can modify your file's 'shared' dropbox link to serve HTML from DB directly.
Upload your html file to dropbox and click the file's 'Share' link:
Copy the "Link to file"
Modify the link by replacing 'www.dropbox.com' with 'dl.dropboxusercontent.com'
Before
https://www.dropbox.com/s/s8ffr2v08jc2f7d/fakeHTMLpage.html?dl=0
After
https://dl.dropboxusercontent.com/s/s8ffr2v08jc2f7d/fakeHTMLpage.html?dl=0
Try it!
I'd love feedback if this worked for you guys!
The file must be in your Public folder in order to be rendered as HTML, it can't just be a shared link.
NB: Accounts created after October 4, 2012 do not have a Public folder unless you upgrade to a Pro account.
As others have said, this is something that you can accomplish by placing the relevant HTML (and JS, CSS, etc.) in the Public folder. However, there is an additional note of which you should be aware: Dropbox Public folders are access limited. If a file generates “An excessive amount of traffic”, the link will be suspended (permanently, for repeat offenses). That link is a little out-of-date as I cannot find a newer link which gives specific numbers for the limit. If the information is still correct, then a little web traffic should certainly not be a problem, but for a site that will serve a large amount of content, you may find the bandwidth restriction on a free account to be a bit stifling:
Excerpt from link above:
According to Dropbox support, public links for free accounts may not use more than 10GB of bandwidth per day while that limit is 250GB per day for paid Dropbox accounts. The links are automatically suspended if any of your files exceed that limit.
There is a lot of stand alone services, to return as lost dropbox functionality. For example:
Simple web pages should be accessible direct from Dropbox via the Dropbox web pages. However, you are limited to simple HTML and client-side JavaScript only, no PHP or other server-side code.
I've just tested it on my own Dropbox and it worked fine.
Here's the reason why it doesn't work:
"There were some Russian IP addresses blocked from hosting html files because of abuse."
Regarding the post above that read It's worth pointing out that you should NOT use the "Share > Link to file" feature for this to work but, instead, right click the file and use the "Copy public link..." one. (On the Web; have not tested on laptop.) –
I tried this and it works from Safari, but includes the white banner across the top of the page with items to click to close, share, etc. Before of course it just rendered as a simple html page with nothing added.
However, it does not work from a browser called Lightning. That one is crashy but quick; I often use it because Safari becomes unresponsive with too many pages/windows open. Lightning now requires that I download the html file. Interestingly though, the original shared public link displayed correctly as always in Lightning, when Safari prompted to download the html file. So now it is switched. Dropbox has really dropped the ball.