HTML forms can submit data using either the GET or POST HTTP method. Understanding the difference is fundamental to writing correct and secure web applications.
- GET: Data is appended to the URL as a query string. Bookmarkable, cacheable, but limited in size and visible in browser history. Use for search forms and filters.
- POST: Data is sent in the request body. Not cached, not stored in history, suitable for large payloads. Use for login, registration, and any state-changing action.