V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
rover5056

能不能把 JS 放到 app 某个地方存着,在使用时调用

  •  
  •   rover5056 · Sep 12, 2017 · 2945 views
    This topic created in 3159 days ago, the information mentioned may be changed or developed.

    开发一款 APP,里面 webview 内嵌 H5 页面。 老大追求更快的加载速度,打包压缩什么的都做了,速度大概在 350ms-450ms 之间,但是还嫌不够。 仔细想了下,只能在加载文件上入手。就来 V2 看看有没有大佬有解决方案

    大概思路就是把主要的库文件( zepto)这种 这样在加载时不用从服务器上 down 这些文件了,直接从 APP 内读取,这样只用加载 HTML+CSS+请求接口,可能速度会快些

    有没有大佬有做过类似的方案,或者大家都来聊一哈可行性?

    3 replies    2017-09-13 09:43:36 +08:00
    begoingtodo
        1
    begoingtodo  
       Sep 12, 2017   ❤️ 1
    可以考虑首次加载时存入 localStorage,或者尝试下 html5 的 manifest
    EXDestroyer
        2
    EXDestroyer  
       Sep 13, 2017
    搜索一下 AK 离线包,不知道是不是你想要的
    EXDestroyer
        3
    EXDestroyer  
       Sep 13, 2017
    AlloyKit
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5144 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 09:45 · PVG 17:45 · LAX 02:45 · JFK 05:45
    ♥ Do have faith in what you're doing.