- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的 JSF 2.2 项目中有包含 Primefaces 5.3 和 Omnifaces 2.3 的字体文件,需要将这些文本字体文件(如 .woff 和 .woff2)放入 wildfly 缓存中,但不幸的是我没有。
图像文件(.gif、.png)和 CSS 文件在缓存中,只有文本字体不在缓存中。
我使用了该站点的提示,但仍然无法正常工作:https://gist.github.com/remibantos/5e86829e1ba6ad64eea1
我将这些谓词放在 wildlfy 中:... path-suffix [ '.woff2'] 或 path-suffix [ '.woff2.xhtml'],
但我无法拥有缓存。
遵循 WildFly 10 用于执行缓存的代码:
standalone-full.xml
<subsystem xmlns="urn:jboss:domain:undertow:3.0">
<server name="default-server">
<host name="default-host" alias="localhost">
<filter-ref name="custom-max-age" predicate="path-suffix['.js'] or path-suffix ['.js.xhtml'] or path-suffix ['.json'] or path-suffix ['.json.xhtml'] or path-suffix ['.html'] or path-suffix ['.css'] or path-suffix ['.css.xhtml'] or path-suffix ['.jpg'] or path-suffix ['.jpg.xhtml'] or path-suffix ['.jpeg'] or path-suffix ['.jpeg.xhtml'] or path-suffix ['.png'] or path-suffix ['.png.xhtml'] or path-suffix ['.gif'] or path-suffix ['.gif.xhtml'] or path-suffix ['.eot'] or path-suffix ['.eot.xhtml'] or path-suffix ['.ttf'] or path-suffix ['.ttf.xhtml'] or path-suffix ['.woff'] or path-suffix ['.woff.xhtml'] or path-suffix ['.woff2'] or path-suffix ['.woff2.xhtml']"/>
</host>
</server>
<filters>
<response-header name="custom-max-age" header-name="Cache-Control" header-value="max-age=64800000, public"/>
</filters>
</subsystem>
请帮我解决这个问题。
谢谢。
最佳答案
经过一番测试,我发现问题出在我没有使用ssl。如果我启用 ssl (https),缓存通常会发生。
然后在网站开发期间我使用 http,当我需要试验缓存时我使用 https。
我不知道为什么会这样,但至少想出了解决这个问题并继续开发的方法。
非常感谢您的所有帮助:)
关于caching - 如何在 Wildfly 10 中缓存字体(.woff、woff2、.ttf、.eot)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37062704/
EOT lite 和 EOT 压缩版有什么区别? 它说 EOT 文件具有内置的域绑定(bind),但例如我可以使用 FontSquirrel 转换器将我的字体转换为 EOT,但我无法输入文件应绑定(b
这是演示:http://jsfiddle.net/ENqy6/ .rur div 中有 3 个西里尔字母。 自定义字体“Rouble”将第一个字母转换为 rur 符号并隐藏其他两个字母(字形宽度设置为
这是我的 bootstrap.min.css 这是我的floder结构 如何在我的 gsp 中获取这些字体? 最佳答案 我的bootstrap.min.css直接在css下,字体和你在同一个目录下。但
我的 eot fot 文件无法在任何浏览器中运行。我主要关心的是 Internet Explorer,因为这是制作文件的浏览器。我试过标准代码,更改字体系列名称以匹配实际字体名称并修改 htacces
警告:您知道他们怎么说“没有愚蠢的问题”吗?好吧,这个是,或者,我怀疑它真的很小,但是为什么不问呢。搜索引擎并没有给我带来任何有用的东西,尽管那可能是糟糕的搜索词。 我最近将 sqlite3 下载到
我不确定为什么会收到此错误。我所有的 gem 都更新到最新。 /bourbon/helpers/font-source-declaration:23: 错误:在 eot 之后读取值时出错 运行时:(我
已结束。此问题正在寻求书籍、工具、软件库等的推荐。它不满足Stack Overflow guidelines 。目前不接受答案。 我们不允许提出寻求书籍、工具、软件库等推荐的问题。您可以编辑问题,以便
因此,我正在尝试使 ftp 脚本正常工作,但遇到了障碍。这是脚本: #!/bin/bash HOST='192.168.178.122' USER='ftpuser' PASSWD='passa.20
我已经在线将 'Helvetica Neue Bold' ttf 转换为 eot.. 但它在 ie8 及以下版本中不起作用.. 我用过这个字体 @font-face { font-family
我无法让我的自定义字体在 IE7 和 IE8 中工作: http://i-creative.dk/iJob/ 它在 IE9、Firefox 和 Chrome 中运行良好... 对于 Firefox 和
我有一个名为 products 的表当我尝试显示表中的所有产品时,它只显示一项。我的代码有什么问题吗? 当我尝试 echo $obj->product_id在 while 循环内,它工作正常并返回所有
我正在开发一个 React UI 组件,它依赖于另一个 UI 组件 (react-widgets/lib/DropDownlist)。此 javascript 模块具有以这些文件扩展名结尾的资源:*.
这让我疯狂了一个多星期,所以我会很感激任何帮助。 我正在尝试将自定义字体导入我的网页。我已经做了一千次了,但这次我没有让它在 IE 8 及以下版本中工作。 我的 CSS 代码是: @font-fac
我在使用 IE7 中的自定义图标字体包时遇到问题。它根本没有加载。它在 IE8+、FF 和 Chrome 中运行良好。 IE8 也使用 eot,所以这不是字体文件本身的问题。 在 IE11 的 IE7
我正在使用 CSS 导入字体。但是,它似乎在 IE 中不起作用。我不知道为什么。 这是我的 CSS 代码: @font-face { font-family: 'bello';
在我的 rails(2.x) 应用程序中。我想在我的 View 中使用自定义字体。所以我在字体文件夹下公共(public)添加了字体文件。当我尝试在 url 中或通过应用程序获取字体时,它通过路由错误
我有一个程序可以从内存中读取某些字符串。这些字符串大部分包含可识别的字符。然而,在字符串中的随机点,会出现“奇怪”的字符。我不认识的字符。通过访问允许我粘贴 Unicode 字符的站点以查看它们是什么
我正在使用 this格式化(我理解是正确的)但我所做的任何事情都不会使字体在 ie7 和 8(使用 ie9 模拟)中工作。 它适用于 Chrome、Firefox 和 IE9。 最佳答案 我认为这个问
我的字体无法兼容所有浏览器。 .ttf 文件适用于所有浏览器,explorer 除外。这是我当前的代码: @font-face { font-family: Gotham; src: url(
我有一些 xml 文件,其中一些控制序列包含在文本中:EOT,ETX(anotherchar)EOT 逗号 ETX 后面的另一个字符并不总是存在,也不总是相同。实际例子: ‚èatturaElett
我是一名优秀的程序员,十分优秀!