Wednesday, February 20, 2013

HTTP GET and POST requests – differences and advantages

GET requests:
  • the parameters are put in the URL string;
  • there is limitations for URL string length (something as 4000 bytes), so huge data cannot be passed this way;
  • the generated page is suitable for search engine optimization;
  • not recommended for sending password (and other sensitive data), because it could be seen in the URL and will exists in browser history;
  • sending files in GET requests is not possible;

POST requests:
  • huge data could be passed this way;
  • suitable for sending passwords;
  • POST requests are never cached;
  • cannot be bookmarked;