7.0.1 HTML and HTTP Metadata

Even before WebDAV, Web servers already had a couple of ways to provide metadata. Some metadata appears in headers when a file is downloaded. For example, every GET response has a Content-Type header:

 
 Content-type: text/html; charset=UTF-8 

The HEAD method can even be used to download headers without downloading the entire resource body. However, there is no way for the client to ask for the header information for all the files in a directory, or for the client to explicitly create or change metadata.

The other place metadata already shows up in the Web is within HTML pages or other documents. For example, the following text may appear inside the header of an HTML file to tell browsers the content-type and character set to use:

 
 <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"> 

Other types of documents include metadata within the file body as well. Portable Network Graphics (PNG) files are images, but they include XML metadata as well as image information inside the file body. PNG metadata includes color and display information but also text information like description, keywords, and the date and time the image was last modified.

Unfortunately, metadata inside file bodies is hard to get at. The entire file must be downloaded, and the client must support the file type. Since just about every file type contains a different set of metadata in a different format, it's impossible to use this information to construct a directory listing. Moreover, as with HTTP header metadata, it's hard for users to annotate documents with their own metadata values. WebDAV's approach is to store properties outside the file body, which means that the metadata can be queried without getting the entire body and updated without changing the body.



WebDAV. Next Generation Collaborative Web Authoring
WebDAV. Next Generation Collaborative Web Authoring
ISBN: 130652083
EAN: N/A
Year: 2003
Pages: 146

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net