坏小仔

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年8月25日

摘要: URLs were designed to be portable. They were also designed to uniformly name all the resources on the Internet, which means that they will be transmitted through various protocols. Because all of thes... 阅读全文
posted @ 2012-08-25 15:52 坏小仔 阅读(120) 评论(0) 推荐(0) 编辑

摘要: Web clients understand and use a few URL shortcuts. Relative URLs are a convenient shorthand for specifying a resource within a resource. Many browsers also support "automatic expansion" of URLs, wher... 阅读全文
posted @ 2012-08-25 15:41 坏小仔 阅读(169) 评论(0) 推荐(0) 编辑

摘要: 2.2 URL Syntax URLs provide a means of locating any resource on the Internet, but these resources can be accessed by different schemes (e.g., HTTP, FTP, SMTP), and URL syntax varies from scheme to sc... 阅读全文
posted @ 2012-08-25 15:32 坏小仔 阅读(338) 评论(0) 推荐(0) 编辑

摘要: 2.1 Navigating the Internet's Resources URLs are the resource locations that your browser needs to find information. They let people and applications find, use, and share the billions of data resourc... 阅读全文
posted @ 2012-08-25 15:14 坏小仔 阅读(117) 评论(0) 推荐(0) 编辑

摘要: In this overview chapter, we've focused on how two web applications (web browsers and web servers) send messages back and forth to implement basic transactions. There are many other web applications t... 阅读全文
posted @ 2012-08-25 15:10 坏小仔 阅读(134) 评论(0) 推荐(0) 编辑

摘要: There are several versions of the HTTP protocol in use today. HTTP applications need to work hard to robustly handle different variations of the HTTP protocol. The versions in use are: HTTP/0.9 The... 阅读全文
posted @ 2012-08-25 14:57 坏小仔 阅读(112) 评论(0) 推荐(0) 编辑

摘要: 1.6.1 TCP/IP HTTP is an application layer protocol. HTTP doesn't worry about the nitty-gritty details of network communication; instead, it leaves the details of networking to TCP/IP, the popular rel... 阅读全文
posted @ 2012-08-25 14:56 坏小仔 阅读(175) 评论(0) 推荐(0) 编辑

摘要: HTTP messages are simple, line-oriented sequences of characters. Because they are plain text, not binary, they are easy for humans to read and write. HTTP messages sent from web clients to web server... 阅读全文
posted @ 2012-08-25 14:43 坏小仔 阅读(121) 评论(0) 推荐(0) 编辑

摘要: 1.4.1 Methods HTTP supports several different request commands, called HTTP methods. Every HTTP request message has a method. The method tells the server what action to perform (fetch a web page, run... 阅读全文
posted @ 2012-08-25 14:37 坏小仔 阅读(132) 评论(0) 推荐(0) 编辑

2012年8月23日

摘要: 1 (function(){ 2 var cache = {}; 3 4 this.tmpl = function tmpl(str, data){ 5 // Figure out if we're getting a template, or if we need to 6 // load the template - and be sure to cache the result. 7 var fn = !/\W/.test(str) ? 8 cache[str] = cache[str] || t... 阅读全文
posted @ 2012-08-23 11:34 坏小仔 阅读(196) 评论(0) 推荐(0) 编辑