Reputation: 25830
Is there a limit to how long the JSONP request can be (the src url)?
For example:
<script src="https://someserver.com/submit?callback=myCallback&alotofdata_maybe_5000_characters_long=true"></script>
Where it has a query string 5000+ characters long. Is that allowed? Will all the browsers send that? Or will some browsers cut the url off?
Upvotes: 1
Views: 1971
Reputation: 42450
See What is the maximum length of a URL in different browsers?
Though the initial answer int he link above references an old article, newer tests show that most browser terminate the URL at about 3000 characters.
Avoid using a URL that you expect will be 5000+ characters in length. It cannot be guaranteed to work in all browsers.
Upvotes: 3