burger menu icon
WillMaster

WillMasterBlog > HTML

FREE! Coding tips, tricks, and treasures.

Possibilities weekly ezine

Get the weekly email website developers read:

 

Your email address

name@example.com
YES! Send Possibilities every week!

Differences Between Method GET and Method POST

Methods GET and POST both refer to how the browser sends information to a web page.

Most people don't need to know what method their browser uses when requesting data. Even as a site developer, it isn't often that a choice needs to be made between GET and POST methods.

Yet, when you do need to make a choice, it is good to know what it is you are choosing.

When links to a web page are tapped, they are method GET. Link URLs (and URLs typed into a browser's address bar) may send additional information to the destination web page through the use of URL parameters. URL parameters are a "?" character appended to the URL and followed by information.

Example URL with parameters.

http://example.com/page.php?name=will&state=awake

Generally, when a form is submitted, it contains information submitted with a form using method POST. Example form:

<form method="post" action="https://example.com">
Name: <input type="text" name="the_name">
<br><input type="submit" value="Tap me">
</form>

So, really, how are GET and POST different from each other?

A link GETs a web page, sometimes with information. A form POSTs to a web page, usually with information.

The entire URL of a GET request is logged in server logs. For POST requests, only the destination URL, not the form information, is logged in server logs.

(Server logs contain information about what goes on at the server. There is no way to bypass all server logs except by modifying the server software. Interactions with the server are noted, generally with the IP address.)

Method GET URLs are length-limited. The maximum length depends on server configuration. Almost always the server will accept at least 255 characters. Often 511 characters. Sometimes as many as 1023 characters.

Method POST generally allows at least 8 megabytes of information, frequently much more, perhaps 32 or even 64 megabytes.

Here is a table of GET and POST differences.

Differences
ItemGETPOST
Data logged in server logsYesNo
Data visible in browser's address barYesNo
General maximum amount of data<=1k>=8mg

The above differences between method GET and method POST are the primary ones considered when a choice needs to be made.

(This content first appeared in Possibilities newsletter.)

Will Bontrager

Was this blog post helpful to you?
(anonymous form)

Support This Website

Some of our support is from people like you who see the value of all that's offered for FREE at this website.

"Yes, let me contribute."

Amount (USD):

Tap to Choose
Contribution
Method


All information in WillMaster Blog articles is presented AS-IS.

We only suggest and recommend what we believe is of value. As remuneration for the time and research involved to provide quality links, we generally use affiliate links when we can. Whenever we link to something not our own, you should assume they are affiliate links or that we benefit in some way.

Recent Articles in the Library

Handling CSV Files With PHP

Reading and writing CSV files with PHP is rather simple, compared to some other tasks.

Easy Random Image

This really is an easy way to implement random image selection.

CSS Rotate

Here is the basic code for rotating a line of text or an image.

Random Colored Circle

A colored circle changes its color to a randomly selected color from your list of colors.

Printed But Not Published

Include something that is not visible in the browser when someone prints your web page.

Download Link for Any File Type

Any file type can be downloaded with this link.

Secret Image File

An image can be loaded into a web page with its source URL never revealed.

How Can We Help You? balloons
How Can We Help You?
bullet Custom Programming
bullet Ready-Made Software
bullet Technical Support
bullet Possibilities Newsletter
bullet Website "How-To" Info
bullet Useful Information List

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2026 Will Bontrager Software LLC