<p>How do you get around this Ajax cross site scripting problem on FireFox 3?</p>

[{'answer_id': 51287, 'author': 'Glenn Slaven', 'author_id': 2975, 'author_profile': 'https://Stackoverflow.com/users/2975', 'pm_score': 5, 'selected': True, 'text': '<p>If you\'re using jQuery it has a callback function to overcome this:</p>\n\n<p><a href="http://docs.jquery.com/Ajax/jQuery.ajax#options" rel="noreferrer">http://docs.jquery.com/Ajax/jQuery.ajax#options</a></p>\n\n<blockquote>\n  <p>As of jQuery 1.2, you can load JSON\n  data located on another domain if you\n  specify a JSONP callback, which can be\n  done like so: "myurl?callback=?".\n  jQuery automatically replaces the ?\n  with the correct method name to call,\n  calling your specified callback. Or,\n  if you set the dataType to "jsonp" a\n  callback will be automatically added\n  to your Ajax request.</p>\n</blockquote>\n\n<p>Alternatively you could make your ajax request to a server-side script which does the cross-domain call for you, then passes the data back to your script</p>\n'}, {'answer_id': 51291, 'author': 'Biri', 'author_id': 968, 'author_profile': 'https://Stackoverflow.com/users/968', 'pm_score': 0, 'selected': False, 'text': '<p>Some more details would be nice: which AJAX library are you using, what would you like to achive, how you do it.</p>\n\n<p>For example it can be a cross-domain Ajax request, which is not allowed. In this case use <a href="http://www.json.org/" rel="nofollow noreferrer">JSON</a>.</p>\n'}, {'answer_id': 548574, 'author': 'Uzbekjon', 'author_id': 52317, 'author_profile': 'https://Stackoverflow.com/users/52317', 'pm_score': 0, 'selected': False, 'text': '<p>I came across this problem recently and it was while I as AJAX loading the local request, not cross site scripting problem. Also, Jimmy himself seems to have the same problem. This seems to be the FF security problem, this article describes the <a href="http://jquery-howto.blogspot.com/2008/12/access-to-restricted-uri-denied-code.html" rel="nofollow noreferrer">cause and the solution to access to restricted uri denied" code: "1012 problem</a>.</p>\n\n<blockquote>\n  <p>Sorry, got that error using JQuery\n  $.ajax on FireFox 3. Tried jsonp\n  suggestion but I think that will only\n  work with something that will serve up\n  json. I\'m trying to create a sample\n  local html file based mashup that will\n  pull data from Yahoo!Finance, but they\n  are serving .csv, so I think I\'m SOL.\n  – Jimmy Chandra (Sep 9 at 17:20)</p>\n</blockquote>\n\n<p>I hope you\'ll find it useful.</p>\n'}, {'answer_id': 679034, 'author': 'Jose M Vidal', 'author_id': 8484, 'author_profile': 'https://Stackoverflow.com/users/8484', 'pm_score': 3, 'selected': False, 'text': '<p>To update the answer (I guess, mostly for my benefit when I come looking for this answer later on), if are loading XML or something else, you can always ask the user if he will allow us to read from another site with this code:</p>\n\n<pre><code>try {\n    if (netscape.security.PrivilegeManager.enablePrivilege)\n        netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");\n} catch (e) { \n    alert("Sorry, browser security settings won\'t let this program run."); \n    return; \n}\n</code></pre>\n\n<p>(from the RESTful web services book) But, this only works in firefox, when the html file is loaded from local file. So, not that useful.</p>\n'}, {'answer_id': 2749743, 'author': 'Eyal', 'author_id': 4454, 'author_profile': 'https://Stackoverflow.com/users/4454', 'pm_score': 1, 'selected': False, 'text': '<p>One more solution: if all you need is the headers, you can specify "HEAD" as the method and it won\'t trigger the security issue.  For instance, if you just want to know if the web page exists.</p>\n\n<pre><code>var client = new XMLHttpRequest();\nclient.open("HEAD", my_url, false);\nclient.send(null);\nif(client.readyState != 4 || client.status != 200) //if we failed\n    alert("can\'t open web page");\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/51283', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5321/']