Commit 6f5c7bf0 authored by Knut Aasgaard Kirkhorn's avatar Knut Aasgaard Kirkhorn
Browse files

Merge branch '2-write-documentation' of...

Merge branch '2-write-documentation' of https://gitlab.stud.idi.ntnu.no/IT2810-H19/teams/team-43/project-2 into 2-write-documentation
parents 3519793e 5a7fc7be
Pipeline #50445 passed with stages
in 4 minutes and 52 seconds
......@@ -15,7 +15,7 @@ $ npm start
This project uses both functional components and a class component (`ButtonGroup`) to show the different ways to implement components in `React`. The class component uses states in the constructor. The rest of the components are functional components and uses the hooks `useState()` and `useEffect()` for states and lifecycle event handling. All components are made from scratch. This project is written with use of ES6 using `let`, `const`, template literals, object descructuring, `import`/`export` and arrow functions.
## AJAX
We used `AJAX` (Asynchronous JavaScript And XML) to load all the assets needed in the website. This was the `SVG`s (images) and the `JSON`s (quotes and credits). This was done using the built in function fetch. To reduce the loading time and number of calls to the server, we only fetch the resources if they are not previously loaded in recent time. When switching back and forth between the exhibitions the content is retrieved from the client and not the server. This was done using the built in caching mechanism in the browsers and using the session storage. The audio is not fetch'ed and is just using the `HTML 5` `audio`-tag.
`AJAX` (Asynchronous JavaScript And XML) was used to load all the assets needed in the website. This was the `SVG`s (images) and the `JSON`s (quotes and credits). This was done using the built in function `fetch()`. To reduce the loading time and number of calls to the server, the resources were only fetched if they were not previously loaded in recent time. When switching back and forth between the exhibitions the content is retrieved from the client and not the server. This was done using the built in caching mechanism in the browsers and using the session storage. The audio is not fetched and is just using the `HTML 5` `audio`-tag.
## HTML Web Storage
In this solution it is used both local storage and session storage.
......
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