# AJAX w/JSON and Localstorage

## Objectives

* Utilize JSON files to separate data from logic
* Use AJAX to load data from JSON files in development and production environments
* Use local storage to store data (semi)-persistently on a user's browser

These additional topics are handy for the following scenarios:

* Loading large amounts of data into JavaScript, as opposed to hardcoding the object.
* Saving your user's state locally in the browser.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://romebell.gitbook.io/sei-802/javascript/additional-topics/ajax-localstorage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
