It’s simple:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<script src="jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$.get("http://twitter.com/statuses/user_timeline/19092829.rss");
});
</script>
</head>
<body>
</body>
</html>
In IE and Opera this works perfectly, but in FF 3.5, Chrome, and
Safari I get a 400 Bad Request. Looking at the request using Fiddler2
and FireBug, something is replacing GET with OPTIONS. But in IE and
Opera, it is still showing up as GET. I don’t get it????
EDIT: I feel like such an idiot for not even thinking of XSS policies. Thanks guys.
You can’t $.get() from a different domain. Security issues.
You can go through a proxy script on your server though. You could use PHP or C# (.NET) to get the data for you and return it to your jQuery script.