- Featured Columnists
-
Table of Contents
- Welcome
- Web Basics
- Publishing on the Web: Putting Files on the Server
- Web Design Process and Workflow
- Project Management
- Mark My WWWord: HTML and XHTML
- Standards Compliance
- Layouts
- Forms
- Meta Tags and Search
- Usability
- Accessibility
- Enhancing Web Page Interaction
- Web Graphics
- Web Page Optimization
- Multimedia
- Content
- Overview of Servers
- Server Programming Basics
- Careers in Web Design
- Tools
- Tutorials
- Intellectual Property for Web Designers
Post vs. Get
Last updated Oct 17, 2003.
By Molly Holzschlag
A lot of confusion comes about for certain authors who are trying to create forms. Largely, this confusion is due to the fact that although you'll be authoring your forms using HTML or XHTML, the processing of those forms is dependent upon server-side scripts, whose methods might vary greatly.
The method attribute requires a value of post or get. There are specific differences between the two.
|
Post |
Get |
|
Form data will appear within a message body. |
Form data is encoded by the browser into a URL. |
|
More functionality: retrieves, stores, updates data, makes modifications to databases, and so on. |
Best used for retrieving data. |
|
Not cacheable. |
Cacheable. |
|
Can buffer long URLs. |
Cannot buffer long URLs. |
|
Considered more secure. |
Considered less secure. |
Based on these comparisons, post is considered the more secure, stable, and useful option when it comes to more complicated forms. For simple data retrievable such as conducting searches, get is useful, but you can use post for that as well.
NOTE
If you are not running your own server and are tapping into form scripts based with your ISP, please check with them directly for which method they recommend using for a given form function.
