2

I often build small static sites, anywhere between 3 and 30 files, that I routinely host and demo for clients. Sometimes I'd like to link to these projects in an SE post to demonstrate some odd behavior, but I often find I'm sometimes conflicted about how to host the demo itself, so that it can be available for the SE community but not a direct link to the actual live/in-development example.

I read in this post that Dropbox is not the best choice for hosting files in a post (I assume the original post in question was linking to a static file of code, but it's since been edited and has no link). However, I'm curious as to whether or not Dropbox is an okay choice for hosting a live demo, using the Copy Public Link feature in the /public folder?

Usually I go through the trouble of creating a Fiddle, but sometimes the demo is too cumbersome to try and contain in a Fiddle, or the behavior changes due to simplification. Sometimes I want to link to a live demo I'm already hosting, but I'd rather not have my test domain be public (e.g. there may be innocuous but client-specific information somewhere), and the link itself will die eventually when I clean up the server anyway, making it useless to future visitors.

Hosting a site via Dropbox wouldn't solve the eventual expiration of the demo link, but it would be more convenient than a Fiddle, and slightly more private than using my test domains.

  • Are there logistical problems with using Dropbox like this?
  • Are there security concerns with using my private Dropbox account to host a link in a public post?
  • Is there a simpler/more accepted way to host a directory of static files that I don't know about?
5
  • 17
    The answer is simple: reduce the problem to the minimal case that reproduces the issue. This is sometimes hard, but never impossible. Questions about problems not displayed in the question itself are off-topic, no matter where you host the problematic code.
    – CodeCaster
    Commented Sep 1, 2016 at 16:21
  • @CodeCaster Agreed, that is usually my tactic, and it almost always works. I've had issues though where the development time of creating a simplified demo (that is still representative of the actual issue) may take longer than just doing my own testing / research, because I myself am not confident in what part(s) of the code might be causing the problem. Also, there are certain issues that cannot be replicated in an IDE like a fiddle or CodePen, and live links seem to be the best idea for those cases.
    – Dpeif
    Commented Sep 1, 2016 at 16:29
  • Just for the record, I am not in the habit of hosting a site and broadly asking what's wrong with it; I'm just interested in giving the best representation of my live code and reported issue in the post. If doing the leg-work to contain that issue in something like a Fiddle is the best option, I will absolutely accept that as an answer.
    – Dpeif
    Commented Sep 1, 2016 at 16:31
  • 2
    I will never go to a random Dropbox link unless it's from someone I know, trust, and can verify their ownership of the Dropbox account. Maybe I'm paranoid, but I've also never gotten a virus or other exploit from downloaded code.... Commented Sep 1, 2016 at 17:19
  • 1

1 Answer 1

14

No.

First of all, you need inline MCVE in the post. If you can't get one yet it is too early to ask question on SO.

If you want to provide additional demo—you are welcome to do so, but we prefer that you use locations that let you have "snapshots" of the code which can stay as it is. Source control websites like GitHub are a good place, and most languages have sites that allow you to freeze code with the ability to fork it later (like JS Fiddle, Ideone.com).

Locations that just serve the content (like Dropbox) allows the post author to update the code thus potentially breaking the demo of the issue.

The worst option is pointing to a live (production) website. It is essentially guaranteed that the problem will disappear from there as soon as a solution is found, making it completely useless for an SO post.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .