


The difference between the two data transmission methods of method=post/get in the Form form_HTML/Xhtml_Web page production
Form provides two methods of data transmission - get and post. Although they are both ways of submitting data, they are very different in actual transmission and may have a serious impact on the data. Although the Web container has shielded some differences between the two in order to conveniently obtain variable values, understanding the differences between the two will also be helpful in future programming.
The get and post methods in Form correspond to the GET and POST methods in the HTTP protocol respectively during the data transmission process. The main differences between the two are as follows:
1. Get is used to obtain data from the server, while Post is used to transfer data to the server.
2. Get adds the data in the form to the URL pointed to by the action in the form of variable=value, and the two are connected using "?", and each variable is connected using "&"; Post puts the data in the form into the data body of the form, and passes it to the URL pointed to by the action in a manner corresponding to variables and values.
3. Get is unsafe because during the transmission process, the data is placed in the requested URL, and many existing servers, proxy servers or user agents will record the request URL in log files. , and then put it somewhere so that some private information may be seen by a third party. In addition, users can also see the submitted data directly on the browser, and some internal system messages will be displayed in front of the user. All Post operations are invisible to users.
4. The amount of data transferred by Get is small, mainly because it is limited by the URL length; while Post can transfer a large amount of data, so only Post can be used to upload files (of course there is another reason, which will be discussed later) mentioned).
5. Get restricts the value of the data set in the Form form to be ASCII characters; while Post supports the entire ISO10646 character set.
6. Get is the default method of Form.
The data transmitted using Post can be correctly converted into Chinese by setting the encoding; while the data transmitted by Get has not changed. We must pay attention to this in future procedures.
_______________________________________________________________________________________________
1. The Get method passes the user's data through the URL request, connects the names of each field in the form and its content as a pair of strings, and places them in the program pointed to by the action attribute. After entering the URL, such as http://www.mdm.com/test.asp?name=asd&password=sad, the data will be displayed directly on the URL, just like the user clicks a link; the Post method uses the HTTP post mechanism to convert the form The name of each field and its content are placed in the HTML header (header) and are sent to the server for processing by the program pointed to by the action attribute. The program will read the form data through the standard input (stdin) method and add it to the server. Processing
2. The Get method requires using Request.QueryString to obtain the value of the variable; while the Post method uses Request.Form to access the submitted content
3. The amount of data transmitted by the Get method is very small , generally limited to about 2 KB, but the execution efficiency is better than the Post method; the amount of data transferred by the Post method is relatively large, it is waiting for the server to read the data, but there is also a byte limit, this is to avoid using the server A large amount of data is used to conduct malicious attacks. According to Microsoft, Microsoft has a limit on the maximum data that can be received using Request.Form(). It is 80 KB bytes in IIS 4 and 100 KB bytes in IIS 5
Suggestion: Unless you are sure that the data you submit can be submitted at once, please try to use the Post method
4. Submitting data through the Get method will cause security issues, such as a login page, submitting data through the Get method , the username and password will appear on the URL. If the page can be cached or others can access the customer's machine, the user's account and password can be obtained from the history record, so it is recommended to use the Post method for form submission; the Post method is submitted A common problem with the form page is that when the page is refreshed, a dialog box will pop up
Recommendation: For security reasons, it is recommended to use Post to submit data

HTMLtagsdefinethestructureofawebpage,whileattributesaddfunctionalityanddetails.1)Tagslike,,andoutlinethecontent'splacement.2)Attributessuchassrc,class,andstyleenhancetagsbyspecifyingimagesources,styling,andmore,improvingfunctionalityandappearance.

The future of HTML will develop in a more semantic, functional and modular direction. 1) Semanticization will make the tag describe the content more clearly, improving SEO and barrier-free access. 2) Functionalization will introduce new elements and attributes to meet user needs. 3) Modularity will support component development and improve code reusability.

HTMLattributesarecrucialinwebdevelopmentforcontrollingbehavior,appearance,andfunctionality.Theyenhanceinteractivity,accessibility,andSEO.Forexample,thesrcattributeintagsimpactsSEO,whileonclickintagsaddsinteractivity.Touseattributeseffectively:1)Usese

The alt attribute is an important part of the tag in HTML and is used to provide alternative text for images. 1. When the image cannot be loaded, the text in the alt attribute will be displayed to improve the user experience. 2. Screen readers use the alt attribute to help visually impaired users understand the content of the picture. 3. Search engines index text in the alt attribute to improve the SEO ranking of web pages.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Dreamweaver Mac version
Visual web development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools
