Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It doesn't matter at all. There is a (very small) argument that it might make your site less hackable to limit the request methods allowed, but not in any real sense. The only thing you need to be careful of is to limit (and probably totally disallow) the use of PUT and DELETE, since they will make a direct change to your server's file system.</p> <p>If a POST request is recieved to a page that is expecting a GET, chances are it's someone playing around to see what your site will accept, possibly to try and find a security hole. Having said that, it isn't likely there would be any potential holes that couldn't be exploited with a GET request as well.</p> <p>It might be useful to allow both, in case you accidentally put a <code>method="post"</code> on a <code>&lt;form&gt;</code> that you didn't mean to, but then equally if you do this it might make it harder to find a problem that shows up further down the line. If you have a script that handles form submissions from more than one form on your site, it would probably be an idea to accept both, but for normal pages there should be no need.</p> <p>One thing you forgot to mention in the question (not that this matters) is that POST requests are also required when uploading a file via a HTML form - the point of a POST request is not simply to hide data from the URL (although this is a useful side-effect), but to allow the client to send an object to the server. This object could be form data, or it could be a file, an XML document, etc etc. For example, many XML-HTTP APIs use POST (and so they should - I came across one that used GET in the past, and it was a nightmare to work with, as it meant you could not have any white-space in the document, or it broke the request, you had to urlencode an XML document, which is time/resource consuming and pointless).</p> <p>It's really something to determine at your discretion.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload