`

the different between Post and Get

阅读更多
1、Get 方法通过 URL 请求来传递用户的数据,将表单内各字段名称与其内容,以成对的字符串连接,置于 action 属性所指程序的 url 后,如[url]http://www.mdm.com/test.asp?name=asd&password=sad[/url],数据都会直接显示在 url 上,就像用户点击一个链接一样;Post 方法通过 HTTP post 机制,将表单内各字段名称与其内容放置在 HTML 表头(header)内一起传送给服务器端交由 action 属性能所指的程序处理,该程序会通过标准输入(stdin)方式,将表单的数据读出并加以处理


2、 Get 方式需要使用 Request.QueryString 来取得变量的值;而 Post 方式通过 Request.Form 来访问提交的内容


3、Get 方式传输的数据量非常小,一般限制在 2 KB 左右,但是执行效率却比 Post 方法好;而 Post 方式传递的数据量相对较大,它是等待服务器来读取数据,不过也有字节限制,这是为了避免对服务器用大量数据进行恶意攻击,根据微软方面的说法,微软对用 Request.Form() 可接收的最大数据有限制,IIS 4 中为 80 KB 字节,IIS 5 中为 100 KB 字节

建议:除非你肯定你提交的数据可以一次性提交,否则请尽量用 Post 方法


4、Get 方式提交数据,会带来安全问题,比如一个登陆页面,通过 Get 方式提交数据时,用户名和密码将出现在 URL 上,如果页面可以被缓存或者其他人可以访问客户这台机器,就可以从历史记录获得该用户的帐号和密码,所以表单提交建议使用 Post 方法;Post 方法提交的表单页面常见的问题是,该页面如果刷新的时候,会弹出一个对话框

建议:出于安全性考虑,建议最好使用 Post 提交数据
分享到:
评论

相关推荐

    计算机网络第六版答案

    Traffic between the Google data centers passes over its private network rather than over the public Internet. Many of these data centers are located in, or close to, lower tier ISPs. Therefore, when ...

    Java邮件开发Fundamentals of the JavaMail API

    * Connections between the JavaMail API and the JavaBeans Activation Framework Objectives By the end of this module you will be able to: * Send and read mail using the JavaMail API * Deal with ...

    Enviro - Sky and Weather V2.0

    You also can choose between different ambient light modes of course. Seasons: Enviro will change seasons and got a components to swap out gameobject, materials and textures of unity terrain. You ...

    Senfore_DragDrop_v4.1

    * The exact version of the Drag and Drop Component Suite you are using. * The exact version of Delphi or C++ Builder you are using. * The name and exact version of your operating system (e.g. NT4 ...

    CE中文版-启点CE过NP中文.exe

    Memory Scan Lua: Scanfiles now also get deleted if the memory scan object is freed before the scan is fully done Fill Memory: Now allows 64-bit addresses Structure Dissect: Fixed the popupmenu "change...

    BURNINTEST--硬件检测工具

    different Video file and codec. Release 5.3 build 1027 revision 0003 WIN32 release 19 August 2008 - Changed the 2D test to wait for the Video Playback test in order to allow memory allocation for...

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    - FIX: With little difference between curve angles at smaller scales the curve was drawn backwards (error in TFlexEllipse.Paint). - ADD: Support of the binary document format. Added the public ...

    Linux Kernel 2.4 Internals

    - System calls are the interface between user space and kernel space. This section explains how system calls are implemented on the i386 architecture. 12. **Atomic Operations (Section 2.12):** - ...

    雷达技术知识

    and the Graduate School of the University of Oregon in partial fulfillment of the requirements for the degree of Master of Science March 2009 11 "Effectiveness of Extracting Water Surface Slopes from ...

    pyloris-3.2-win32

    Setting the --requesttype flag will change the HTTP method used. Available options are GET, HEAD, POST, PUT, DELETE, OPTIONS, and TRACE. Certain proxies and load balancers will filter out certain ...

    外文翻译 stus MVC

    The Web brought some unique challenges to software developers, most notably the stateless connection between the client and the server. This stateless behavior made it difficult for the model to ...

    BobBuilder_app

    This means that you do a binary search in the page list in log M time and get the value in O(1) time within a page. RaptorDB starts off by loading the page list and it is good to go from there and...

    Handbook of Research on Soft Computing and Nature-Inspired Algorithms

    thedistancebetweentherequirementsandtheobtainedtrialsolution.Thedeviceunderdevelopment  canbeanalyzedwithclassicalnumericalmethodologiessuchasFEM,FDTD...

    Android SampleNetworking

    We’d have to go through all the different places and make change. By having a single point for parsing the XML results, it makes code easier to maintain and it becomes reusable. I want to point out...

    JavaScript Functional Programming for JavaScript Developers (PDF, EPUB, MOBI)

    You'll get to grips with creational, structural, and behavioral patterns as you discover how to put them to work in different scenarios. This updated edition will also delve into reactive design ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    Header Files The #define Guard Header File Dependencies Inline Functions The -inl.h Files Function Parameter Ordering Names and Order of Includes Scoping Namespaces Nested Classes Nonmember, Static ...

    VB编程资源大全(英文源码 网络)

    So 下载 the code and get involved with the News Group, help us to help you.<END><br>4 , urllink.zip User control to launch web browser and jump to URL.<END><br>5 , vbftp.zip Sample application ...

    Sap Ruby Ajax

    To get started with this integration, you will need to install Ruby on Rails along with the necessary dependencies. The following versions are recommended: - **Ruby**: Version 1.8.4 or higher - **...

Global site tag (gtag.js) - Google Analytics