Lab 10: Data Portability
Due: Monday, Apr 28th
This lab introduces two common techniques for making application data portable—so that your data can be transferred between sessions or systems:
- Using the
window.location
object to encode and share application data within a URL. - Using the
FileReader
interface to import data from a file and export data for download.
Just for fun, this lab uses made up dinosaur names for the two approaches.
References¶
The following MDN reference pages may be helpful:
- localStorage
- URLSearchParams
- location
- JSON.stringify() and JSON.parse()
- encodeURIComponent() and decodeURIComponent()
- data: URLs
- FileReader
Instructions¶
- Download the starter file lab10.html
- Complete the app as specified in the page's aside.
- Most
TODO
comments are 1 line of code. - Some are 2–3 lines of code (plus braces).
- Most
- Upload your finished
lab10.html
to Gradescope.- This lab will be graded manually.