Search code examples
htmlextjsextjs4.1extjs-stores

Where does ExtJS's store keeps all the data


I want to know where does ExtJS store keeps all the data? I know the data is stored in the memory but I want to know does it used HTML 5 local storage internally or if any other technique is employed?

Thanks, Deepesh


Solution

  • It depends.

    In every case, the data of the store is stored in a Javascript object. The store persists its data via a proxy. It is a matter of configuration how this data is stored. You can configure different types of proxies:

    Client side storage

    • LocalStorageProxy - saves its data to localStorage if the browser supports it
    • SessionStorageProxy - saves its data to sessionStorage if the browsers supports it
    • MemoryProxy - holds data in memory only, any data is lost when the page is refreshed

    Server side storage

    • Ajax - sends requests to a server on the same domain
    • JsonP - uses JSON-P to send requests to a server on a different domain
    • Rest - uses RESTful HTTP methods (GET/PUT/POST/DELETE) to communicate with server
    • Direct - uses Ext.direct.Manager to send requests

    More details are in the docs.