Commit f7b67ad1 authored by Ingunn Sund's avatar Ingunn Sund
Browse files

Update README.md

parent 1bc9dffb
Pipeline #50447 canceled with stages
......@@ -21,7 +21,7 @@ This project uses both functional components and a class component (`ButtonGroup
In this solution it is used both local storage and session storage.
### Local Storage
Local Storage was used to store favorited exhibition combinations. The `localStorage` stores its data in the web browser between each session of the web browser. To favorite a combination its added a star in the top right corner of a exhibition. If the user clicks twice it will not be favorited anymore. The website is implemented so that the user can view all its favorited exhibitions by clicking a button and open a modal. This opens a similar view to the main exhibition view, but its content is just the favorited combinations. When removing a combinations from the favorites it will be removed from `localStorage` aswell.
Local Storage was used to store favorited exhibition combinations. The `localStorage` stores its data in the web browser between each session of the web browser. A star was added in the in the top right corner of the exhibitions to favorite a combination. If the user clicks twice it will not be favorited anymore. The website is implemented so that the user can view all of its favorited exhibitions by clicking a button and open a modal. This opens a similar view to the main exhibition view, but its content is just the favorited combinations. When removing a combinations from the favorites it will be removed from `localStorage` aswell.
### Session Storage
Session Storage was used to store the recently loaded exhibition content (as a cache). This made it possible to not fetch all resources every time they was needed. Algough the browser have a built in cache when fetching these files, this was implemented as a challenge and to use the `sessionStorage`. The `sessionStorage` does only keep its data in each session of the webbrowsers tab of the website. This makes it much more useful for something that one does not need to keep over a longer time (e.g. cache).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment