Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] 为什么 icon 中的字体 url 没有使用 https 协议 #12639

Closed
awxiaoxian2020 opened this issue Feb 21, 2024 · 4 comments
Closed

Comments

@awxiaoxian2020
Copy link

我注意到,在 #11441 删去了在#10079 引入的 https 协议,这样做有什么考虑吗?

在微信小程序中请求的协议似乎只能是 https。现在引入 icon 会报 Failed to load font.

@inottn
Copy link
Collaborator

inottn commented Feb 21, 2024

// 是相对协议 URL,它会使用与当前页面相同的协议进行加载。如果当前页面使用的是 HTTP 协议,则 "//" 将使用 HTTP 协议加载资源。如果当前页面使用的是 HTTPS 协议,则 "//" 将使用 HTTPS 协议加载资源。这种相对协议的写法通常用于确保在不同协议下加载相同的资源,以提供更好的灵活性和兼容性。

测试了微信是支持 // 这种格式的。

@awxiaoxian2020
Copy link
Author

好的,我来看看能否提供可供复现问题的代码,如果不能复现,我将关闭这个 issue.

@awxiaoxian2020
Copy link
Author

经测试,是由于缓存引起的问题。十分抱歉打扰了。

@awxiaoxian2020 awxiaoxian2020 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2024
@inottn
Copy link
Collaborator

inottn commented Feb 21, 2024

没事,问题解决了就好 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants