1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    Groningen, Netherlands
    Posts
    55
    Answers
    1
    Vote Rating
    0
    hermanvandermaas is an unknown quantity at this point

      0  

    Default Unanswered: Load JavaScript file from server or from offline storage if needed

    Unanswered: Load JavaScript file from server or from offline storage if needed


    How can I load a simple JavaScript file, in such a way that when a users' device is offline, the file is retrieved from the localStorage?

    The file I want to load is not a Sencha Touch formatted class.

    I use Sencha Cmd and added this JavaScript file (mathparser-min.js) in the app.json. The file is properly stored in the localStorage. When a user's device is offline this file must be loaded from the localStorage, just like the Sencha Touch classes that I inlcuded with 'require'.

    Preferably, I want this file to be added to app.js when I use Sencha Cmd to build for production.

    Just including the JavaScript file in the html head section like below does not work.

    Code:
    <!DOCTYPE HTML>
    <html manifest="cache.appcache" lang="en-US">
    <head>
         <script type="text/javascript" src="mathparser-min.js"></script>
         <!-- other html -->
    <body></body>
    </html>
    Any help would be appreciated.

  2. #2
    Sencha User
    Join Date
    Jan 2011
    Posts
    134
    Answers
    6
    Vote Rating
    5
    JRS is on a distinguished road

      0  

    Default Have you tried app.json file

    Have you tried app.json file


    Hi Herman,

    Have you tried the app.json file. I believe you can add the file here and then use require statement to load it.

    I have not tried this - but I believe it may work - recall reading that sometime back.

    Good luck

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi