1

Should I use in this case method="post" or method="get" for ajax form submission?

Update: When should be used post and when get in case of ajax form submission?

<form  action="script.php" method="post">
  <label>Url: </label> 
  <input value="http://" id="url-input" type="text" size="100" /><br />
  <label>paste html file source: </label><textarea rows="10" cols="60"></textarea><br />
  <input type="checkbox" checked /> parse links<br />
  <input type="checkbox" checked /> parse images<br />
  <button type="submit" id="submit-html">Submit</button>
</form>

Thanks

Community
  • 1
  • 1
Ben
  • 25,389
  • 34
  • 109
  • 165

1 Answers1

1

Well if you're pasting HTML source code, you're definitely going to want to use POST so you don't end up with a million characters in the request URI using GET... I'd say any time you use a textarea, you should be posting the data.

animuson
  • 53,861
  • 28
  • 137
  • 147