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 3949778
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:32:01+00:00 2026-05-20T01:32:01+00:00

My Problem I am trying to load JSON encoded data from a remote site

  • 0

My Problem

I am trying to load JSON encoded data from a remote site using jQuery, however when jQuery tries to call this URL it appends the correct function to callback=? so it’s something like callback=jsonp1256856769 but it also adds _=1256856769 to the url. So the url ends up being something like http://www.example.com/link/to/file.php?format=json&lang=en&callback=jsonp1256856769&_=1256856769

Now the problem is that that file that I am using that calls it can’t interpret the _=1234234 and I can’t change it so I have to fix the jQuery problems

My Question

How can I get jQuery to not appened that _= to the URL that it calls

What I have done to try to figure out my problem

  • Removed all other javascript libraries from the page
  • Tried several different versions of jQuery

My Code

function getData(){
    url = "http://www.example.com/link/to/file.php";
    url += "?format=json&lang=en";
    $.getJSON(url+"&callback=?",function(data){formatData(data);});
}

*Above is the snippet of JavaScript that I am currently using

*Note the domain I am using is not example.com

  • 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-20T01:32:01+00:00Added an answer on May 20, 2026 at 1:32 am

    UPDATE: added code

    The _= part is there, because JSONP request are cache: false by default. You can set cache: true, which will make the _= part go away, but the browser will cache the requests.

    function getData() {
        url = "http://www.example.com/link/to/file.php";
        url += "?format=json&lang=en";
        $.ajax({
            'url': url,
            'type': 'GET',
            'dataType': 'jsonp', // this adds &callback=? by design
            'cache': true,
            'success': function(data) { formatData(data); }
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There I am trying to load XML content from a remote host using Node.js.
In trying to figure out this problem (which is still unsolved and I still
I'm trying to solve this flickering problem on the iphone (open gl es game).
Here are some models I am trying to load data for: class School(models.Model): name
I am trying to load image like in this link,- it doesn't work, only
I have an unnormalized events-diary CSV from a client that I'm trying to load
Having a problem trying to create a function, as part of a BizTalk helper
I'm running into a problem trying to anchor a textbox to a form on
I've ran into a problem while trying to test following IRepository based on NHibernate:
(see here for the problem I'm trying to solve) How do you get hibernate

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.