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

  • Home
  • SEARCH
  • 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 9249007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:05:21+00:00 2026-06-18T10:05:21+00:00

Its a bit unclear how Javascript internally is doing the request. I know its

  • 0

Its a bit unclear how Javascript internally is doing the request. I know its not using the build-in

browser XMLHttpRequest, but how does it do it? Read an article on stackoverflow where they simply create a Javascript

object and set the
var obj = document.createElement(‘script’);
obj.src = “http://somedomain.com?blabla=yes“

Using JavaScript to perform a GET request without AJAX

Here from jQuery:

 $.ajax({
        type: 'GET',
        url: url,
        async: false,
        jsonpCallback: 'jsonCallback',
        contentType: "application/json",
        dataType: 'jsonp',
        success: function(json) {
            console.log("console. hurra");
        },
        error: function(e) {
            console.log(e.message);
        }
    });

Do you know how does jQuery internally build up the request in Javascript and submit it?

I tried this locally and it worked like charm in the sense that the the script was inserted correctly in my page.
var CampaignNs = {

GET: function(url) {
    var head = document.getElementsByTagName('head')[0];
    var n = document.createElement('script');
    n.src = url;
    n.type = 'text/javascript';
    n.onload = function() { // this is not really mandatory, but removes the tag when finished.
        head.removeChild(n);
    };
    head.appendChild(n);
}

}

I advance thanks

Good article here:
http://johnnywey.wordpress.com/2012/05/20/jsonp-how-does-it-work/#comment-359

  • 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-06-18T10:05:22+00:00Added an answer on June 18, 2026 at 10:05 am

    Using XHTTPRequest or inserting tags are both valid ways to trigger GET requests. XHTTPRequests are cleaner in many ways tough because they don’t involve messing around in the DOM.

    Its a bit unclear how Javascript internally is doing the request. I
    know its not using the build-in

    browser XMLHttpRequest, but how does it do it?

    This makes no sense. JavaScript (i.e. the JavaScript implementation in your browser) need not rely on XHTTPRequest, it just invokes the browser’s HTTP APIs if it needs to do requests. Which it doesn’t need to do except through XHTTPRequest 🙂

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

Sidebar

Related Questions

I know its a bit of a far fetched question. But is it possible
Somehow its a bit difficult to for me to build a query like this:
I've been researching similar questions, but I'm still a bit unclear if it's possible
Sorry if the title is a bit unclear/ambiguous but I am unsure of how
I wanted to know how does writeInt treat a 32 bit unsigned or a
I've been instantiating subclasses in javascript using object = new class () but I
I m really sorry for unclear question title but I am a bit confused
I know its a bit long. I'm trying to catch up on a deadline
Yeah, its a bit on this side of pointless, but I was wondering... I've
I already seen this question, but since its a bit outdated, I was wondering

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.