What is the difference between get and post in web forms




















Static variables, what is their life span? NET Session? What does mean Stateless? What is the Difference between session and caching? What are different types of caching using cache object of ASP.

Which method is used to remove the cache object? How many types of Cookies are available in ASP. What is the code behind and Inline Code in Asp. What is master page in ASP. Can you change a Master Page dynamically at runtime?

What is cross-page posting in ASP. How to redirect a page in asp. How to register custom server control on ASP. NET page? How do you validate Input data in Asp. What's the difference between ViewData and ViewBag? Difference between Response. Why the distinction matters In the same context where the pragmatic difference is stated, the HTML 2.

However, it does not explain why those methods are recommended for idempotent vs. Neither does it explain what practical difference there might be between the methods. Alan Flavell has explained, in an article in a thread titled Limit on URL length in the newsgroup comp.

He gives the following reason for conforming to the advice: When users revisit a page that resulted from a form submission, they might be presented with the page from their history stack which they had probably intended , or they might be told that the page has now expired. Typical user response to the latter is to hit Reload.

This is harmless if the request is idempotent, which the form author signals to the browser by specifying the GET method. Browsers typically will indeed "should" caution their users if they are about to resubmit a POST request, in the belief that this is going to cause a further "permanent change in the state of the universe", e.

If users get so accustomed to this happening when they try to reload a harmless idempotent request, then sooner or later it's going to bite them when they casually [OK] the request and do, indeed, order a second pizza, or invalidate their previous competition entry by apparently trying to enter twice, or whatever.

It needs to be noted, though, that using "GET" gives no protection against causing changes. A script which processes a form submission sent with the "GET" could cause a pizza ordering. It's just that authors are expected to take care that such things don't happen. Moreover, the use of "POST" cannot guarantee that the user does not inadvertantly submit the same form data twice; the browser might not give a warning, or the user might fail to understand the warning.

Users are known to become impatient when it seems that "nothing happens" when they click on a button, so they might click on it again and again. Thus, robust processing of forms should take precautions against unintended duplicate actions. As a simple example, a submission might be processed first by a script which sends back a page containing a confirmation request, echoing back the data submitted and asking the user to verify it and then submit the confirmation.

For query systems this may have a considerable efficiency impact, especially if the query strings are simple, since caches might serve the most frequent queries. Follow Share Cite Authors.

Anonymous comments 5 September 4, , am Awesome article : — Thanks : — Related Comparisons. Contribute to Diffen Edit or create new comparisons in your area of expertise. Log in ». Terms of use Privacy policy. Parameters remain in browser history because they are part of the URL.

The browser usually alerts the user that data will need to be re-submitted. Safest to use less than 2K of parameters, some servers handle up to 64K.

So it's saved in browser history and server logs in plaintext. A safe URL length limit is often characters but varies by browser and web server. GET method should not be used when sending passwords or other sensitive information.

POST method used when sending passwords or other sensitive information. GET method is visible to everyone it will be displayed in the browser's address bar and has limits on the amount of information to send.



0コメント

  • 1000 / 1000