add to cart links - was: [ic] customization

Joachim Zobel jzobel at heute-morgen.de
Thu Nov 11 12:22:56 EST 2004


Am Mi, den 10.11.2004 schrieb Patrick Donker um 22:47:
> Joachim Zobel wrote:
> > One should be aware that "add to cart" _links_ are in violation of RFC
> > 2616:
> > 
> > http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1
> 
> Call me stupid, but where does it actually *say* that 'add to carts' are 
> not allowed?

"Add to cart" is not idempotent, which means that repeating the request
does not have the same effect as doing it only once.

The immediate effect is that pressing "Reload" is adding more, which is
not what you would expect from reloading. This can be avoided if the
shop does a redirect to a display page after adding an item.

One also should be aware that responses to GET requests are by default
cacheable, but probably interchange adds headers to avoid this.

In addition, with "add to cart" links the search engines start shopping.

Since the GET does not change an important server state (as Mike Heins
noted), nothing really bad happens, but it would be cleaner to have a
"set cart to <number>" link or to do POST requests.

Sincerely,
Joachim

-- 
"... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden 
koennen."                            - Bertolt Brecht - Leben des Galilei 



More information about the interchange-users mailing list