# Browser Forensic Investigations of Instagram Utilizing IndexedDB Persistent Storage
## 3 Background for IndexedDB and LevelDB
### IndexedDB  
IndexedDB is a persistent NoSQL transactional database technology that takes advantage of client-side storage for web applications. It is fast and highly efficient, since B-trees are heavily utilized in its structure. B-trees enable fast manipulation of data on databases of considerable size [31]. With IndexedDB, entire databases can be employed for each web origin in a consistent structure, even within different platforms. This consistency is ensured by the specifications shared by W3C (World Wide Web Consortium) [32]. Currently, W3C published three versions of IndexedDB, with the latest one, IndexedDB API 3.0, being released in 2021 [14]. Moreover, it was highly adopted by major web browsers in a relatively short amount of time [33]. Table 2 presents the dates that major web browsers started their support for IndexedDB technology. These browsers constitute over 83 percent of their market [34]. The implementation technologies of the browsers are also listed in Table 2.  
SQLite is prevalently seen in the preponderance of storage technologies, including the ones providing fundamental functionality to the browsers such as history and bookmarks. Similarly, it is the underlying technology for IndexedDB in Firefox browsers. Contrarily, Google Chrome constructed IndexedDB over LevelDB technology [35; 36]. In various benchmark and experimental research, LevelDB has proved more efficient and secure compared to SQLite in terms of fast operations on key-value pairs and batch updates [37]. Additionally, LevelDB provides extra security for IndexedDB by keeping its.ldb files locked in accordance with the SOP (Same Origin Policy) [38]. As is seen in Table 2, the pioneering implementation of Google Chrome has been adapted through most of the modern browsers for IndexedDB, making SQLite the second-most-popular implementation. The API standards of IndexedDB published by W3C provide standard management for the developers through JavaScript code. In other words, even though the underlying technology of the IndexedDB might differ between browsers, its control is identical. There is a level hierarchy in the IndexedDB API. The highest level in this hierarchy is a database. All databases are associated with a version that helps the server keep the storage up to date with updates. If developers introduce updates to the database, a function called onupgradeneeded is called to regenerate the database and its lower-level structures. Subsequently, databases contain object stores that are analogous to tables in traditional databases [39]. An example of IndexedDB control through JavaScript code can be seen in Code 1 and Code 2 with the API 3.0 specifications. Code 1 demonstrates the initiation process in three steps of establishing a database, creating an object store, and populating it with data. A data retrieval is similarly easy with the utilization of the read function over transactions. The function access is handled with unsuccessful and onerror functions as demonstrated in Code 2, with steps of establishing a transaction, creating a request, and handling the return. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Browser** & **Support** & **Underlying Technology** \\ \hline Google Chrome & 2012 & LevelDB \\ \hline Mozilla Firefox & 2011 & SQLite \\ \hline Microsoft Edge & 2015 & LevelDB \\ \hline Opera & 2013 & LevelDB \\ \hline Internet Explorer & Only partial support &.dat file format \\ \hline \hline \end{tabular}
\end{table} 
Table 2: IndexedDB Support and Technology in Web Browsers. ```
// Step 1--establishing a database  const firstRequest = indexedDB.opent(\"IndexedDBDDemonstration\"); let DemonstrationDatabase; // onupgradedeneded is called when database does not exist or an upgrade is needed. firstRequest.unogradeneded = function() { const DemonstrationDatabase = firstRequest.result; // Step 2--creating an object store.