How is the shorter GUID user friendly?

I just joined this blog that uses ShortGuid to create registration validation tokens.

When I tried to open the link that said In short and the Guid> URL , it looks like the link is redirecting to another link. He opens a website in another language.

But I have a few questions: how can the shortest manual be user-friendly? And when should I use it?

+8
c # url guid asp.net-mvc
source share
5 answers

There is also a copy / past benefit. If I understand correctly, this is not about good URLs, but about validation tokens. Many people copy / pase codes with a double click, and then Sguid (ShortGuid) is really more user friendly. Try:

Xy0MVKupFES9NpmZ9TiHcw

540c2d5f-a9ab-4414-bd36-9999f5388773

+6
source share

How can a shorter manual be user friendly?

If your users type URLs manually rather than clicking links, this is not very likely.

And when should I use it?

All characters in the GUID ( AF , 0-9 , - ) are URL safe, so "security" is not really an argument.

You might want to consider it for aesthetic reasons or for the convenience of copying a URL.

+5
source share

Guid are usually expressed in base 16 (using 0-9 and AF). This makes the lines long. The same amount of data can be expressed in a shorter line if you use more characters (0-9, az, AZ and other special characters such as _ or @).

While they have nothing to do with your code at all, long GUIDs are ugly to have URLs or anything the user can see so you can convert them to a shorter format that is still not very pretty. but takes up less space.

Some might argue that a shorter format requires less bandwidth, but practical savings are negligible.

+2
source share

How can a shorter manual be user friendly?

You answered your question in the question. This is pretty obvious: 7A9D35A3 (shorter) is much easier to remember / type than 7A9D35A3-4999-4130-8E2B-EB0447D942FA .

And when should I use it?

An example is its use as a reference. Some examples:

  • "An error has occurred, contact support. Help: 7A9D35A3"
  • "Your reservation has been confirmed! Booking code: 7A9D35A3"
+1
source share

How to use db table to match identifier with GUID. Something like

 ID GUID 1000 540c2d5f-a9ab-4414-bd36-9999f5388773 1001 123c2d5f-a9ab-4414-bd36-9999f5388773 1002 567c2d5f-a9ab-4414-bd36-9999f5388773 

It would be much easier to scale or migrate using the id in each db table and you will get a clean id.

0
source share

All Articles