Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4084664
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:28:09+00:00 2026-05-20T18:28:09+00:00

Requesting data from any location on my domain with .load() (or any jQuery ajax

  • 0

Requesting data from any location on my domain with .load() (or any jQuery ajax functions) works just fine.

Trying to access a URL in a different domain doesn’t work though. How do you do it? The other domain also happens to be mine.

I read about a trick you can do with PHP and making a proxy that gets the content, then you use jQuery’s ajax functions, on that php location on your server, but that’s still using jQuery ajax on your own server so that doesn’t count.

Is there a good plugin?

EDIT: I found a very nice plugin for jQuery that allows you to request content from other pages using any of the jQuery function in just the same way you would a normal ajax request in your own domain.

The post: http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/

The plugin: https://github.com/jamespadolsey/jQuery-Plugins/tree/master/cross-domain-ajax/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:28:09+00:00Added an answer on May 20, 2026 at 6:28 pm

    This is because of the cross-domain policy, which, in sort, means that using a client-side script (a.k.a. javascript…) you cannot request data from another domain. Lucky for us, this restriction does not exist in most server-side scripts.

    So…

    Javascript:

    $("#google-html").load("google-html.php");
    

    PHP in “google-html.php”:

    echo file_get_contents("http://www.google.com/");
    

    would work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a project I'm working on, I'm requesting data from an external API in
I have got a simple flex client requesting some data from a php script.
If I have a resource that a requesting client doesn't have access to but
When requesting hardware for a WebLogic server, what hardware would best improve its performance?
I often have customer requesting changing properties, like the version history setting on all
I need code in Perl for requesting and parsing ATOM and RSS feeds. Is
There are many techniques to enforce strong passwords on website: Requesting that passwords pass
I am working on an ASP.NET page that we, in code impersonate the requesting
We have a custom written on-line job application... application. HR is requesting a skill
Quick question, looking for some recommendations. I have a site that will be requesting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.