These questions



ask what to do about answers like this

Try this : http://jsfiddle.net/s0m3R4nd0mCh4r/

The answers recommended commenting, downvoting and editing.

I'm in favor of editing to pull in the components of the linked JSFiddle since it is the most direct way of improving the Question or Answer. I recently did this on this question Strange bug with OpenLayers + CloudMade

The interesting thing is that in HoLyVieR's sample answers 1, 2, 3, 4, 5, 6 the answers were just downvoted. Nobody bothered to edit the posts.

Since I don't spend any time on the JS tag, I want to know: Does the community support my editing posts that have JSFiddle links and are missing the content? Also, does the age of the post matter?

4 Answers 4


Yes, yes, yes! I do this too when I see it, but only pulling in relevant code to the answer (don't add the sample data that's just made for the preview). An answer which is just a link is not an answer. If that jsFiddle is ever lost, then the answer effectively becomes useless and would have to be deleted.

I aggressively advise people to provide more substantive details in their answers, even those with higher amounts of reputation.


There is nothing wrong if you include in the answer the code that you find in the jsFiddle linked to the answer. The idea is that who reads the question should be able to read the answer without going to a different page/site; the reason is the usual one: link rot happens.

It is fine to have the link to the jsFiddle, which can be useful for testing in real time how the code works. The link to the jsFiddle adds value to the answer, as the OP is able to verify the result produced by the code. Still, there is should be the opportunity of easily getting the proposed code, without to visit an external site.

The answer should be of any benefit for who asked the question, but also for any future reader that has the same problem the OP has. For that reason, the answer should be valid even when the jsFiddle site is not anymore operative. A link to a site that doesn't exist anymore doesn't help who reads the question, but is not able to read the answer.


Despite link rot I would argue that questions (not answers) with primarily a jsfiddle + some basic backstory such as JQuery slideUp/slideDown doesn't work as supposed to are both clear and force the user to create a stand alone test case. The reason I am saying this is because it seems hypocritical to tell users to place this code inside their question, when every time a user does this people complain that there is too much code (the user might lack the skill to narrow the problem down*) or that part of the code is missing. And retrospectively once an answer explains what was wrong the original code isn't important anymore either way.

*E.g. in the previously mentioned question an established user (4k) complained about this and edited the question to contain the part of the code he believed to be relevant, yet missed the important part entirely, so it seems hardly fair to expect this from less experienced programmers.


No, because of copyright issues. Stack Overflow content is licensed as Creative Commons Attribution-ShareAlike which may not be compatible with whatever license the linked code is under.

I suggest down-voting and leaving a comment to the poster to edit in the code themselves.

An exception may apply:

  • If the code is short and trivial, or
  • If the code clearly states that it's in the public domain or under a compatible license (in a comment or otherwise).
  • Well, the question specifically refers to JSFiddle, not any old code that happens to be linked to. I don't see any indication on the JSFiddle site (please correct me if I'm wrong) that states that the code is owned by JSFiddle if on their site. Given that the design of the site is to share code, I find it unlikely that they would licence it.
    – Servy
    Commented Jun 20, 2012 at 16:36
  • Servy, the default then is that copying is disallowed unless otherwise stated in the code (my second bullet point). Commented Jun 20, 2012 at 16:41
  • 2
    @Servy under "legal stuff and credits" on jsfiddle All code belongs to the poster and no license is enforced. We are not responsible or liable for any loss or damage of any kind during the usage of provided code. You can read into that what you will Commented Jun 20, 2012 at 17:23

You must log in to answer this question.

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