helloworld12
V2EX  ›  问与答

前端有没有什么方案,可以下载压缩包,然后整个解压,使用里面的资源

  •  
  •   helloworld12 · Sep 5, 2018 · 3035 views
    This topic created in 3009 days ago, the information mentioned may be changed or developed.

    游戏开发,h5,出现,部分资源加载不全的问题 想要整个包下载,然后前端解压,再使用里面的资源,有什么方案吗?

    谢谢

    Supplement 1  ·  Sep 6, 2018
    目的不是压缩,是确保所有资源都打包到一起,防止有的资源没有下载下来
    7 replies  •  2018-09-06 03:41:08 +08:00
    imwalson
    imwalson
    Sep 5, 2018 via Android
    1
    纯粹的 html 前端做不到;如果把 node.js 也算作前端,是可以的
    misaka19000
    misaka19000
    Sep 5, 2018
    3
    gzip 还不够用吗?
    shiny
    shiny
    Sep 5, 2018
    4
    http/2 服务器推送试试?
    acthtml
    acthtml
    Sep 5, 2018
    5
    js、css 通过 webpack 打包。
    其他资源没有想到什么方法。
    SilentDepth
    SilentDepth
    Sep 5, 2018
    6
    JS 可以解压 zip,但解析里面的文件比较复杂,需要对应的解析库,比如 excel.js 之类的。通用的文件管理器,理论上似乎能做,但是现成的解决方案没见过。
    msg7086
    msg7086
    Sep 6, 2018
    7
    HTTP 本来就会压缩吧。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4326 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 09:01 · PVG 17:01 · LAX 01:01 · JFK 04:01
    ♥ Do have faith in what you're doing.