General discussion

  • Creator
  • #4049139

    Fetch Data

    by trackourshipment512 ·

    I am going to fetch data from my site and display to my another site. But when I put the ajax call it shows nothing in the same server, when when we call the ajax request from different server it shows the result.

    • This topic was modified 2 weeks, 4 days ago by Avatar photokees_b.

You are posting a reply to: Fetch Data

The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our Community FAQs for details. All submitted content is subject to our Terms of Use.

All Comments

  • Author
    • #4049165
      Avatar photo

      Re: fetch data

      by kees_b ·

      In reply to Fetch Data

      On the same server, try localhost to connect to.

    • #4049548

      Reply To: Fetch Data

      by seatyboie ·

      In reply to Fetch Data

      To get around this, utilise Cross-Origin Resource Sharing (CORS) to allow AJAX queries from other domains. CORS is a method that allows a server to control which domains have access to its resources. To enable CORS, configure the server that is supplying the data to include the necessary headers in its response.

Viewing 1 reply thread