title: Save JSON File Locally
body: <p>I am designing an HTML5 website that allows you to create and position shapes with several attributes. The shapes are created as divs of class="shape" and the attributes are stored to each shape div using the data method. I'd like to be able to save the position and attributes of the shapes, in a JSON file, with a user defined name. </p>
  
  <p>Currently, I am using ajax and php to generate the JSON file and save it on the server. </p>
  
  <p>Any ideas or thoughts on how it should be done? Bonus points for libraries, APIs and examples!</p>
  
  <p>Clarification Edit: Saving to a discrete file in a user-defined location would be preferable. However, depending on the difficulty factor between the two options, browser storage could certainly suffice.</p>