title: It is fine to translate guids generated client-side directly to server-side, store them, etc? No higher risk of collisions?
body: <p>I've written a client-side application. I am now creating a backend for it to persist data, but am curious about GUID implementations.</p>
  
  <p>Client side, I generate a Song object with a unique ID using the following JavaScript. It is based off of <a href="https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript">this StackOverflow post</a>.</p>
  
  <pre><code>//Based off of: https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
  generateGuid: function () {
      var startStringFormat = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
  
      var guid = startStringFormat.replace(/[xy]/g, function (c) {
          var r = Math.floor(Math.random() * 16);
  
          var v = c === 'x' ? r : (r &amp; 0x3 | 0x8);
  
          return v.toString(16);
      });
  
      return guid;
  },
  </code></pre>
  
  <p>Now, I'm defining a class in C# to represent my Song object:</p>
  
  <pre><code>public class Song
  {
      public virtual Guid Id { get; set; }
      public virtual Guid PlaylistId { get; set; }
      public virtual int VideoId { get; set; }
      public virtual string Url { get; set; }
      public virtual string Title { get; set; }
      public virtual int Duration { get; set; }
  }
  </code></pre>
  
  <p>Doing so got me wondering about the implications of the interacting Guid objects. Can I just take all of the Song objects I have in localStorage and do a direct translation of their Guids? Should I regenerate all of them?</p>