Giter Site home page Giter Site logo

Comments (3)

phodal avatar phodal commented on May 18, 2024

我不是很懂你的问题。

你说的这些缓存应该都是 HTTP 缓存,是由 HTTP 服务器控制的和应用没有关系。

from microfrontends.

mantou132 avatar mantou132 commented on May 18, 2024

举个例子:
独立部署,宿主 app 加载子应用是使用的 {src: 'a.b.c/a.js'}
那么不更新宿主 app 时这个 url 永远不会变。

子应用要更新,最终打包部署,最新资源还是 'a.b.c/a.js',那么怎么更新呢?

只能使用协商缓存,宿主 app 加载子应用时必须问服务端有没有新资源。

而我们现在加载静态资源最佳实践确实 cdn + 强制缓存,构建时加上 hash 或者版本号。

from microfrontends.

phodal avatar phodal commented on May 18, 2024

静态资源肯定要 hash…….。不 hash,所有的缓存都会出现问题。

所以,我觉得是你们设计有问题啊,你要加载子应用,肯定存在某个配置。这个配置说明应用在哪里。

from microfrontends.

Related Issues (20)

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.