2

http://www.example.com?a=1&a=2 has a valid form-urlencoded querystring and has two values (1 and 2) for the key a.

  1. Is there any spec or standard for URL consumers guaranteeing ordering (or lack thereof) of parsed values?
  2. Do common implementations (Django's QueryDict, dojo's queryToObject, PHP, etc) preserve ordering?

1 Answer 1

2

OK, this question: Authoritative position of duplicate HTTP GET query keys, suggests there is no such standard and that order should not be considered reliable.

My experience has been that latest WebKit encodes identically named form fields in DOM order and that Django's QueryDict preserves that order. Shaky ground at best.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.