RSS Feed

JSFiddle – error : Please use POST request

Posted on

JSFiddle is one great online tool for playing with JavaScript. It’s simple to use and you can include several libraries like jQuery, mooTools, YUI, Raphael.js, Three.js etc.

Today, I faced the following error while running fiddle for the first time on Firefox at my home. It worked very well at my office though.

{"error": "Please use POST request"} 

I tried searching online, but found no direct answer. So, deciding to investigate myself, I found out that the problem was because of “NoScript” plugin I installed on my Firefox. Though I allowed the site “jsfiddle.net”, NoScript detects potential XSS(Cross site Scripting) and blocks it. Generally it shows a notification on the top when such a thing happens. In this case, the notification stays only for a few unnoticeable seconds, that too, only for the first time and most of us wouldn’t catch it.

The NoScript Console said the following:

[NoScript XSS] Sanitized suspicious upload to [http://fiddle.jshell.net/_display/###DATA###PGh0bWwgbGFuZz0iZW4iPgogIDxoZWFkPgogICAgPG1ldGEgY2myExtraCharactersgiPgogICAgPHRpdGxlPkNhbnZhcyBQYWludCAtIEV4YW1wbGUgNTwvdGl0bGU%2BCiAgICAKICA8L2hlYWQ%2BCiAgPGJvZHk%2BCiAgICA8cD48bGFiZWw%2BRHJhd2luZyB0b29sOiA8c2VsZWN0IGlkPSJkdG9vbCI%2BCgogICAgICAgIDxvcHRpb24gdmFsdWU9ImxpbmUiPkxpbmU8L29wdGlvbj4KICAgICAgICA8b3B0aW9uIHZhbHVlPSJyZWN0Ij5SZWN0YW5nbGU8L29wdGlvbj4KICAgICAgICA8b3B0aW9uIHZhbHVlPSJwZW5jaWwiPlBlbmNpbDwvb3B0aW9uPgogICAgPC9zZWxlY3Q%2BPC9sYWJlbD48L3A%2BCgogICAgPGRpdiBpZD0iY29udGFpbmVyIj4KICAgICAgPGNhbnZhcyBpZD0iaW1hZ2VWaWV3IiB3aWR0aD0iNDAwIiBoZWlnaHQ9IjMwMCI%2BCiAgICAgICAgPHA%2BVW5mb3J0dW5hdGVseSwgeW91ciBicm93c2VyIGlzIGN1cnJlbnRseSB1bnN1cHBvcnRlZCBieSBvdXIgd2ViIAogICAgICAgIGFwcGxpY2F0aW9uLiAgV2UgYXJlIHNvcnJ5IGZvciB0aGUgaW5jb252ZW5pZW5jZS4gUGxlYXNlIHVzZSBvbmUgb2YgdGhlIAogICAgICAgIHN1cHBvcnRlZCBicm93c2VycyBsaXN0ZWQgYmVsb3csIG9yIGRyYXcgdGhlIGltYWdlIHlvdSB3YW50IHVzaW5nIGFuIAogICAgICAgIG9mZmxpbmUgdG9vbC48L3A%2BCgogICAgICAgIDxwPlN1cHBvcnRlZCBicm93c2VyczogPGEgaHJlZj0iaHR0cDovL3d3dy5vcGVyYS5jb20iPk9wZXJhPC9hPiwgPGEgCiAgICAgICAgICBocmVmPSJodHRwOi8vd3d3Lm1vemlsbGEuY29tIj5GaXJlZm94PC9hPiwgPGEgCiAgICAgICAgICBocmVmPSJodHRwOi8vd3d3LmFwcGxlLmNvbS9zYWZhcmkiPlNhZmFyaTwvYT4sIGFuZCA8YSAKICAgICAgICAgIGhyZWY9Imh0dHA6Ly93d3cua29ucXVlcm9yLm9yZyI%2BS29ucXVlcm9yPC9hPi48L3A%2BCiAgICAgIDwvY2FudmFzPgogICAgPC9kaXY%2BCgogICAgPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiIHNyYz0iZXhhbXBsZTUuanMiPjwvc2NyaXB0PgoKICA8L2JvZHk%2BCjwvaHRtbD4K] from [http://jsfiddle.net/usernamehere/fiddleidhere/]: transformed into a download-only GET request.

The obvious and easy solution is to use another browser(Chrome) while using jsFiddle. However, if you want to do it in Firefox, you have to do the following.

The remedy is to add http://fiddle.jshell.net/ to the Anti-XSS Exceptions list under the Options > Advanced > XSS tab. Read more about bypassing Anti-XSS filters for certain web pages for NoScript.

^http?://fiddle\.jshell\.net/_display

If something still goes wrong, make sure to check the console in Firefox from Tools > Web Developer > Error Console or [Ctrl+ Shift + J]

About Sundeep

For some strange reasons, I always will be 'what I wanted to be' rather than 'what I am'. I finished my under-grad and I'm working for a Software company as a developer. I love learning(with earning, of course) and teaching.

5 responses »

  1. Thanks so much, that fixed my problem with jsfiddle completely 🙂

    Reply
  2. You are welcome and thank you for the comment.

    I am glad it helped you.

    Reply
  3. It really helps! Thanks!

    Reply
  4. False Identity

    Thank you!

    Reply

Leave a comment