什么是“超媒体数据格式”?在谈论Cookies时,在菲尔丁(Foringing)的著名论文中是指 [英] What does "hypermedia data formats" mean in Fielding's famous dissertation when talking about Cookies

查看:74
本文介绍了什么是“超媒体数据格式”?在谈论Cookies时,在菲尔丁(Foringing)的著名论文中是指的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下引用自 Fielding的REST论文6.4.3.2 Cookies


,通过在
中定义购物商品的语义,使用cookie来标识服务器端数据库中特定于用户的购物
购物篮可以更有效地实现
超媒体数据格式,允许用户代理在自己的客户端购物篮中选择并存储
项,并在
处包含一个URI,以便在客户端访问时结帐准备好购买

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.

那么超媒体数据格式究竟是什么是什么意思?

推荐答案

讨论的是所传输数据的格式是什么,以便客户端知道如何读取数据以及如何处理。因此,对于HTML,格式为文本/ html,对于mp4音频,格式为 audio / mp4。

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.

虽然可以使用其他方法定义和解释数据,但是超媒体数据格式是HTTP标准的一部分,并且定义明确,不需要任何外部帮助。

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.

这篇关于什么是“超媒体数据格式”?在谈论Cookies时,在菲尔丁(Foringing)的著名论文中是指的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆