Run library offline

Dear all,

i have a serious question regarding the possibility to run the library offline.
I am creating a web app that can run both online and offline.
In case of offline, i will be looking for the data from local xml files.

To run offline, the user will download a folder with all the js files and then open the index file stored locally on the C Drive.

Then the dhtmlx library will open the local data xml files located next to the index file in order to populate its controls.

However, i did a try with the treeview for instance using:


where MainMenu.xml is a static tree xml file located locally on the C drive in folder XML next to index.html, i get the following message:

Error Type: Data Structure
XML Refers to non existing parent

The funny thing is that when i run it on the web server, it works all fine

Any clue why? This is really important to me to consider how to use dhtmlx offline…

Thanks in advance

There are some limitations with above approach, when loading page from local filesystem there are some differences in browsers behavior

IE uses different component for such kind of loading, which most probably will result in slowdown
FF and Chrome will refuse to load any xml files outside of the folder where main html file is stored ( because of security reasons )

If you target relatively new browsers - you can go with html5 cache instead of storing files locally.

Dear Stanislav

Thanks for the answer, i managed to find the solution. I am using caching with manifest.
The only issue is that i need to explicitly define in the manifest file all the dhtmlx files one by one… particularly the images.

But it is working fine now with caching. In fact the js library would refuse to open the XML files locally due to security reasons and sandbox running…

Thanks anyway for the reply! :slight_smile: