I want to generate a GUID/UUID for my web app to use but I'm not sure if I should generate it on the client or server or what should be the preference.
Basically, I'm working on a web app similar to e-commerce app.
Here are the steps:
1) User logs into the web app
2) User can create a new transaction or search for an existing transaction.
3) If user selects create transaction, a new transaction number will be generated and shown to the user while he's creating the transaction. On submitting the transaction, all the transaction details will be saved including transaction number + timestamp (for more uniqueness).
If user selects search, they can find an existing transaction by searching by the transaction number that was generated when the transaction was created.
What are the pros and cons for both? What is normally done?