jquery / jquery/api.jquery.com

Ajax: add note on how to bypass query string alteration for JSON requests

Open
#878 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
325
Forks
260
PR merge metrics
No merged PRs in 30d

Description

See https://github.com/jquery/jquery/issues/1799

JSON requests will sometimes get promoted to JSONP if deemed cross-browser (we already document that part). We add a callback name to the query string for JSONP requests (we document that too). The part that isn't documented is that in rare cases, the data for a json request contains a question mark, and so the callback name may be injected into a weird part of the string. Users can work around this by setting jsonp to false.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing Ajax JSONP documentation and use the linked jQuery issue #1799 for context. Done means the documentation explains that setting jsonp to false bypasses callback injection when JSON request data contains a question mark.

Written by the indexing model from the issue text.

Assessment

Tech stack
jquery
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.