0

There are 2 ways that data is appended to URL (atleast that's what I am aware of, there can be more ways)

  1. Http get method
  2. .serialize()

Both of them append data to the url and are mostly used in forms. But I want to know what is the use of appending data to the url? In what cases will I need to append USER data to the URL? If there are cases and advantages, I can make use of them but I cant think of a reason for exposing user data through url from a form.

fscore
  • 2,567
  • 7
  • 40
  • 74

1 Answers1

0

The easy response is for ease of bookmarking.

Say for example you have searched for a flight on a website and you want to save the results for later or send them to a friend.

Sending them www.flightpub.com wont help, but sending www.flightpub.com?destination=somewhere&source=nowhere&airline=planesRus will allow them to run the same search as you without having to refill all the form data.

Of course you don't want to do this for secure information, there are other ways for that, and you also have a rather small size limitation of when using GET, see here

Community
  • 1
  • 1
RossBille
  • 1,448
  • 1
  • 17
  • 26
  • now it really depends on what you want to do with the user data and what the user data is – RossBille May 29 '14 at 03:59
  • Well that's my main question, why Will I ever append user data from a form. . – fscore May 29 '14 at 04:04
  • Okay, that wasn't clear from the question, anyway the answer is that it depends on what this "user data" is and if it would need to be used in the situation I described or similar – RossBille May 29 '14 at 04:13