简体   繁体   中英

Access denied problem in AJAX

I want to parse a web page into my page, so i prefer AJAX in my code. While using the AJAX it showing "Access denied" - before fetching the specified page. The page doesn't consider any login information.

Even though i cant able to get the page of google too..

Please guide me to how to use the AJAX so for

Thanks,
Praveen

You can send XMLHttpRequest s only to your domain. if your site is example.com you can send XMLHttpRequest s only to example.com . Firefox 3 supports cross-domain requests but you need to send Access-Control first.

The solution is to send a request to your domain and fetch cross-domain content via some server language (Java, PHP, Python, etc.)

You can also use a hack to retrieve data through a CSS include http://nb.io/hacks/csshttprequest

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM