how store json data locally without having extract specific url eg. from, www.example.com/myjson.php
the situation: code works, when uploaded , run through server
eg. www.example.com/mycodethatworks.html
but when run locally json code wont return value.
thus when build 'adobe build' whole code useless , doesn't work json not returning value.
how solve issue?
use localstorage:
// store value in localstorage localstorage.setitem( "myjson", json.stringify(myjsonvar) ); // read value localstorage , parse myjsonvar = json.parse( localstorage.getitem("myjson") );
Comments
Post a Comment