Firefox and Chrome do not support cross-domian ajax by default?

Posted by Ethan on Stack Overflow See other posts from Stack Overflow or by Ethan
Published on 2010-05-17T16:34:56Z Indexed on 2010/05/17 20:30 UTC
Read the original article Hit count: 185

Filed under:
|

The following code works as expected in IE8 and Safari4, but not work in Firefox3.6 and Chrome. All browsers are on Windows.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>
        <script type="text/javascript">
            $(function() { $('#tabs').tabs(); });
        </script>
    </head>
    <body>
        <div id="tabs">
            <ul>
                <li><a href="http://www.google.com/">Google</a></li>
                <li><a href="http://www.msn.com/">MSN</a></li>
            </ul>
        </div>
    </body>
</html>

Seems that Firefox and Chrome do not support cross-domian ajax by default, right? Is there any easy way to turn on cross-domian ajax in Firefox and Chrome?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui