Web applications and HTTP protocols

Source: Internet
Author: User
Tags webp

First, Web applications

  A Web application is an application that can be accessed through the web;

The biggest benefit of the program is that the user has easy access to the application, and the user needs only a browser and no additional software to install.

There are two modes of application: C/S,/b.

1, c/S is a client/server-side program, which means that such programs generally run independently.

2, b/S is browser-side/server-side applications, such applications generally with the help of Google, Firefox and other browsers to run.

Web applications are generally b/s mode. Web applications are first "applications", and programs written in standard programming languages, such as Java,python, are not inherently different. in the sense of network programming, the browser is a socket client, and the server is a socket service side.

#-*-Coding:utf-8-*-__author__ = ' Qiushi Huang ' Import socketsock = Socket.socket () sock.bind (("127.0.0.1", 8800) # Server Ground Address and Port Sock.listen (5) while True:print ("Server Waiting ...") # Conn: Client socket object, ADDR:CONN,ADDR = Sock.accept () # etc User connection data = CONN.RECV print ("Data", data) # reads HTML file with open ("Index.html", "R") as F:data = f  . read () # response First line (http/1.1 OK), Response body # conn.send (b "http/1.1 Ok\r\n\r\n

  

Web applications and HTTP protocols

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.