Giter VIP home page Giter VIP logo

Comments (5)

BNDong avatar BNDong commented on July 30, 2024

很抱歉之前的回答。仓库目前使用的 cdn 是 jsdelivr,我了解了一下,当通过 cdn 第一次访问时候,cdn 会根据这个 url 将文件缓存起来。过后即使修改删除了文件,只要 url 匹配就会读取缓存。

关于缓存的更新:目前更新缓存官方并没有提供工具,但是提供了api(需要发邮件向官方申请权限),自动更新缓存应该在一天左右。

替代方案:修改文件名是一个方式,但是比较繁琐。但 jsdelivr 是可以通过版本加载文件的,可以通过 commit 的哈希值作为版本加载,这样可以实现立即生效的这么一个效果。

from cnblogs-theme-simplememory.

juejian avatar juejian commented on July 30, 2024

谢谢。

from cnblogs-theme-simplememory.

yubaoliu avatar yubaoliu commented on July 30, 2024

我用PicGo, 把自定义域名设置成https://cdn.jsdelivr.net/gh/... , 去上传图片时,发现图片并不能完整的上传,往往只上传了上半截,是图片太大了吗?有人遇到过这个问题没?

from cnblogs-theme-simplememory.

Borber avatar Borber commented on July 30, 2024

我用PicGo, 把自定义域名设置成https://cdn.jsdelivr.net/gh/... , 去上传图片时,发现图片并不能完整的上传,往往只上传了上半截,是图片太大了吗?有人遇到过这个问题没?

jsd cdn 上限是20m 不要太大了

from cnblogs-theme-simplememory.

SMARK2022 avatar SMARK2022 commented on July 30, 2024

我知道这个怎么修改缓存,我也遇到了这个问题
但是下面的成功解决:
例如下面的jsdelivr文件地址
https://cdn.jsdelivr.net/gh/jquery/[email protected]/dist/jquery.min.js
只需要把cdn.jsdelivr.net替换成purge.jsdelivr.net然后复制到浏览器访问就会更新缓存
https://purge.jsdelivr.net/gh/jquery/[email protected]/dist/jquery.min.js

这个原理就是把原来的服务器缓存的内容强制过期,再下一次中重新加载

from cnblogs-theme-simplememory.

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.