¢When you send form
data to the server using the HTTP get method, the form data is appended to the URL specified
in the action attribute of the <form> element.
¢The form data is
separated from the URL using a question mark. Following the question mark you get the name/value
pairs for each form control. Each name/value pair is separated by an
ampersand (&).
¢One of the great
advantages of passing form data in a URL is that it can be bookmarked. If you
look at searches performed on major
search engines such as Google, they tend to use the get method so that the page can be
bookmarked.
HTTP get Disadvantage
¢The get method,
however, has some disadvantages. Indeed, when sending sensitive data such as the
password shown here, or credit card details, you should not use
the get method because the sensitive data becomes part of the
URL and is in full view to everyone (and could be bookmarked).
Situations to Avoid “Get”
❑ You are updating a data source such as a database or
spreadsheet (because someone could make up URLs that
would alter your data source).
❑ You are dealing with sensitive information, such as
passwords or credit card details (because the sensitive form data
would be visible as part of a URL).
❑ You have large amounts of data (because older
browsers do not allow URLs to exceed more than
1,024 characters — although the recent versions of the main
browsers do not have limits).
❑ Your form contains a file upload control (because
uploaded files cannot be passed in the URL).
0 comments:
Post a Comment