0
當我運行我的應用程序時,Chrome瀏覽器中出現Resource interpreted as Font but transferred with MIME type font-woff
警告。我知道這是一個常見的錯誤&圍繞同一問題有很多帖子。資源解釋爲字體,但通過NodeJS與MIME類型font-woff一起傳輸
我正在使用NodeJS和ExpressJS來運行我的Web應用程序,並且提供的大多數解決方案都適用於IIS或ASP.NET。
我看了看下面的鏈接
警告只是在於鉻broswer。
Resource interpreted as Font but transferred with MIME type font-woff: "data:font-woff;base64,d09GRgABAAAAADV4ABMAAAAAVVAAAQAAAAAAAAAAAAAAAAAAAAAAA…0RofyBQ0TTUkwj7OhEtUMmyHSjGSOTuWY2rI32PdNJPiQZL3TSQq4+STRSagAAAAFVQS0vAAA=". jquery.js:1083
(anonymous function) jquery.js:1083
assert jquery.js:895
Sizzle.setDocument jquery.js:1082
(anonymous function) jquery.js:2556
(anonymous function) jquery.js:2611
(anonymous function) jquery.js:34
(anonymous function)
請幫忙。
'application/font-woff' – idbehold
@idbehold:我應該在哪裏添加這個?我知道這個問題是由於缺少'mime-type'。但是用'NodeJs',我不知道應該在哪裏添加'mime-type'? – SharpCoder
它看起來像你使用數據uris創建它們,所以:那裏。 'data:application/font-woff; base64,.......' –