Subject: URI equivalence and query parameter sequence

From: "Darrel Miller" <[email-masked]>
Date: Mon, 11 Jul 2011 17:18:04 +0000

To get to the point, I would like to know if the following two URIs can be
considered equivalent.

   http://example.org/location?x=34&y=67

    http://example.org/location?y=67&x=34

The HTTP spec refers to RFC 3986 for rules on normalization and comparison.
In RFC3986, it does discuss the use of "syntax based normalization"
(http://tools.ietf.org/html/rfc3986#section-6) but makes no mention of query
parameters.

It is my understanding (and quite possibly incorrect) that ordering of query
parameters is not significant to most server implementations.  Is there any
official opinion on this?  Is it reasonable to consider these two URIs as
accessing the same resource? Or should I redirect one URI to the other?

Thanks,

Darrel Miller

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Mon, 11 Jul 2011 23:28:08 +0200

>    http://example.org/location?y=67&x=34

They can be considered equivalent and they can be considered different.
If you make a crawler and find you have to aggressively weed out dupli-
cates, you might find it best to consider them equivalent. In other
cases you might find it best to consider them different. You may also
have specific knowledge about `example.org` that provides an answer.
Unlike for, say, the difference between "http:" and "HTTP:" there is no
generic specification that answers your question.
-- 
Björn Höhrmann · mailto:[email-masked] · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

---

From: Dale Anderson <[email-masked]>
Date: Wed, 13 Jul 2011 21:55:58 -0700

Darrel,

In terms of how the original web server interprets the request, named query
parameters' order may likely matter only in the case of trump or order when
repeatedly specified query parameters.

But, keeping them consistent may help avoid cache pollution in a simple
caching scheme that does not evaluate the query string meaningfully, rather
keys off the literal URI.

Also bear in mind the case of unnamed query parameters like ?buy&cat which
are certainly important as far as their identity is their index ordinal
position in the series

In my estimation!

Regards,

Dale

2011/7/11 Darrel Miller <[email-masked]>