Web infrastructure with HTTP protocol

web infrastructure with HTTP protocol

Domain Name Overview

Domain concepts:

1.IP easy to remember address

Early use the Hosts file to resolve domain names:

1. Host Name Repeat

2. Host difficult to maintain

DNS (Domain Name System Domain Name System):

1. Distributed

2. Levels

Domain name space structure:

1. root zone

2. The top-level domains: organizational domain / domain name Country

3. secondary domain name

4.FQDN = host name suffix .DNS

The concept of ## pages

Web page:

Plain text file, which is written in language HTML, is "translated" in the user's browser to a web page displayed

website:

There is a constitution of a page, is a combination of multiple pages

Web page:

After opening the website the first page that appears is called the site home page (or home page)

domain name:

Enter the URL when browsing the web

HTTP:

The communication protocol used to transmit the page

URL:

Addressing system is a World Wide Web

HTML:

Used to write web pages HTML

Hyperlink:

Hyperlinks are different web sites feature will connect the

release:

Then take before uploading to the web server process for user access

HTML Overview

HTML Hyper Text Markup Language:

1.Hyper Text Markup Language

2. pages of "source"

Browser: "interpretation and implementation of the" HTML source tools:

Here Insert Picture Description

HTML document structure:

1.HTML page

2. The head part

3. The header section

4. The body portion

5. Web content, including text / images, etc.

Example:

Here Insert Picture Description

Basic tab page

Snippets of information role:

1. conducive browser parses

2. conducive to search engine

<Title> tag
<Meta> tag

Example:
Here Insert Picture Description

Title Tag
Line Control Related Tags
Label range
Image tag
Hyperlink label
Special symbols

Example:
Here Insert Picture Description

Web Overview

Web (World Wide Web) that is the World Wide Web, also known as the World Wide Web
A distributed graphic information system
Built a network service on the Internet

Here Insert Picture Description

Web1.0 vs Web2.0

Web1.0:

1. edit feature, available to users of the site content is edited to provide treatment, and then read the contents of a user's website. This process is one-way site to the user's behavior

Web2.0:

1. pay more attention to the interaction, the user is both a user of the site content consumers (viewers), but also the amount of web content producers

2. Strengthening the interaction between the user and the website, the website content based on users, the site's many features are also involved in the construction by the user to achieve a two-way site to the user and participation Jiangliu

Static pages

静态网页是标准的HTML文件
扩展名是.htm、.html:

1.文本,图像,声音,FLASH动画,客户端脚本和ActiveX控件及JAVA小程序等

是网站建设的基础,早期网站一般都由静态网页制作的
没有后台数据库,不含程序和不可交互的网页
相对更新起来比较麻烦,适用于一般更新较少的展示型网站

静态网页特点

1.每个静态网页都有一个固定的URL,而且URL以 .htm、.html、.shtml等常见形式为后缀,而不含有“?”
2.网页内容一经发布到网站服务器上,无论是否有用户访问,每个静态网页都是保存在网站服务器上的,也就是说,静态网页是实实在在保存在服务器上的文件,每个网页都是一个独立的文件
3.静态网页的内容相对稳定,因此容易被搜索引擎检索
4.静态网页没有数据库的支持,在网站制作和维护方面工作量较大,因此当网站信息量很大时完全依靠静态网页制作方式比较困难
5.静态网页的交互性较差,在功能方面有较大的限制
6.页面浏览迅速,过程无需连接数据库,开启页面速度快于动态页面

动态网页

1.网页URL不固定,能通过后台与用户交互
2.在动态网页网址中有一个标志性的符号——“?”
3.常用的语言有ASP,PHP,JSP等

动态网页的特点

1.交互性:

即网页会根据用户的要求和选择二动态改变和响应,将浏览器作为客户端界面,这将是今后WEB发展的大势所趋

2.自动更新:

即无须手动更新HTML文档,便会自动生成新的页面,可以大大节省工作量

3.因时因人而变:

即当不同的时间,不同的人访问同一网址时会产生不同的页面

HHTP协议概述

HTTP协议是互联网上应用最为广泛的一种网络协议,设计这个协议的目的是为了发布和接收Web服务器上的HTML页面
HTTP协议的版本:

1.HTTP 0.9

2.HTTP 1.0

3.HTTP 1.1

4.HTTP 2.0

HTTP方法

HTTP支持几种不同的请求命令,这些命令被称为HTTP方法(HTTP method)
每条HTTP请求报文都包含一个方法,钙塑服务器要执行什么动作

1.获取一个Web页面

2.运行一个网管程序

3.删除一个文件等

HTTP协议有多种获得Web资源的方法,常用的两种:GET和POST
HTTP方法 描述
GET 请求获取Request-URI所标识的资源
PUT 请求服务器存储一个资源,并用Request-URI作为其标识
DELETE 请求服务器删除Request-URI所标识的资源
POST 在Request-URI所标识的资源后附加新的数据

GET方法

GET方法:从指定的服务器上获得数据

1.GET请求能被缓存

2.GET请求会保存在浏览器的浏览记录里

3.GET请求有长度的限制

4.主要用于获取数据

5.查询的字符串会显示在URL中,不安全

POST方法

POST方法:提交数据给指定服务器处理

1.POST请求不能被缓存

2.POST请求不会保存在浏览器的浏览记录里

3.POST请求没有长度限制

4.查询的字符串不会显示在URL中,比较安全

HTTP状态码

1.当使用浏览器访问呢某一个URL,会根据请求URL返回状态码
2.通常正常的状态码为2xx,3xx(如200)
3.如果出现异常会返回4xx,5xx(如404)
状态码首位 已定义范围 分类
1xx 100-101 信息提示
2xx 200-206 成功
3xx 300-305 重定向
4xx 400-415 客户端错误
5xx 500-505 服务器错误

生产环境中常见的HTTP状态码

消息 描述
200 OK 请求成功(其后是对GET和POST请求的应答文档)
301 Moved Permanently 请求的永久页面跳转
403 Forvidden 禁止访问该页面
404 Not Found 服务器无法找到被请求的页面
500 Internal Server Error 内部服务器错误
502 Bad Gateway 无效网关
503 Service Unavailable 当前服务不可用
504 Gateway Timeout 网关请求超时

HTTP protocol request process analysis

Here Insert Picture Description

Guess you like

Origin blog.51cto.com/14464303/2443440