• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Get vs Post

Gittins Gal

Fingers like lightning
Joined
Jan 3, 2014
Messages
889
Likes received
96
Thanks received
43
Ive just been completely stumped by a question a permie has asked me (please bear with me - I'm primarily a SQL dev).

I have a page that redirects to another page passing a postcode on the query string. Pretty standard stuff but he asked me why I'm doing a get instead of a post. And I couldn't really answer him.

This isn't sensitive data - is there any reason to use a post over a get in this scenario? Or for that matter a get over a post? I should imagine a post involves squirting more markup over the wire but I have an all encompassing form in the master page anyway so I can't really use that argument.

I'm guessing that in this instance it doesn't matter and it is just a spurious question from a permie.
 
If the page is using the postcode to make a different page for each postcode then it should by right have a unique URL with the postcode in it. So a Get.
 
If the page is using the postcode to make a different page for each postcode then it should by right have a unique URL with the postcode in it. So a Get.

That's the answer I needed earlier! It would have shut the permie up...
 
One of the advantages of using the GET method is you can bookmark the URL and search engines will crawl your page and index it. With a post this cannot happen.
 
One of the advantages of using the GET method is you can bookmark the URL and search engines will crawl your page and index it. With a post this cannot happen.

What postcode does a search bot use?
 
Whichever one is on the link that they crawl.


And in this instance that URL does not exist. I mean Google has intelligence but not so much that it can input post code and crawl a URL.

Anyway, POST makes sense if the data is quite huge since QS has a limit. Advantage of GET is that the URL can be directly loaded without the need to re post the data.
 

Advertisers

Back
Top