Below is quoted from Fielding's REST dissertation 6.4.3.2 Cookies
Likewise, the use of cookies to identify a user-specific “shopping basket” within a server-side database could be more efficiently implemented by defining the semantics of shopping items within the hypermedia data formats, allowing the user agent to select and store those items within their own client-side shopping basket, complete with a URI to be used for check-out when the client is ready to purchase.
For the bold part, does it mean to store the items in the page? Such as hidden elements of a form? If so, I think customer will lose his purchase when he leaves the page.
So what exactly does the hypermedia data formats
mean?
What it is talking about is what format the data being transferred is so the client knows how to read it and what to do with it. So with HTML, the format would be "text/html" and with mp4 audio it would be "audio/mp4".
Without such indications when the data is sent by the server, the client has no way of knowing for sure how to interpret the data being sent.
While the data can be defined and interpreted using other methods, hypermedia data formats are part of the HTTP standard and well defined, not requiring any outside helpers.