GithubHelp home page GithubHelp logo

压缩功能有问题 about ping HOT 2 CLOSED

GuoRuiLv avatar GuoRuiLv commented on August 10, 2024
压缩功能有问题

from ping.

Comments (2)

 avatar commented on August 10, 2024

这个应该是 asset.js 和 app.js (app.js 对应最开始版本的静态服务器,asset.js对应后来综合版本里的静态服务器)中的 response.setHeader('Content-Length', stats.size); 这一行导致的,大约原因是面对压缩比比较大的CSS文件(比方说从几百K压缩成几十K),这里的Content-Length是原始文件的大小,浏览器识别到这个值后会一直等待读取,而事实上压缩后的文件早传完了,所以造成“浏览器呈假死状态”,直到浏览器2分钟超时。将这一行注释即可解决这个问题。

from ping.

JacksonTian avatar JacksonTian commented on August 10, 2024

嗯嗯。不要用在生产环境。这个是早年的练手作品。

或者真的想用,可以发Pull Request

from ping.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.