首页 文章

Play Framework: 生产环境 和开发模式中的不同图标

提问于
浏览
2

我有一个Play Framework 2.1.0应用程序, 生产环境 模式中的favicon是默认的Play Framework图标,而在开发中它是我定义的图标 . 相同的路线为我提供了prod中的默认图标,以及dev中的正确图标 .

这是我链接图标的方式:

<link rel="icon" type="image/png" href="@routes.Assets.at("images/favicon.png")">

我有

GET         /assets/*file             controllers.Assets.at(path="/public", file)

在我的 routes 文件上 . 图标文件在 /public/images 中,我使用 play clean compile stage 编译应用程序以进行 生产环境 .

知道为什么路线指向prod和dev中的不同位置,或者为什么它默认为Play图标?

1 回答

  • 0

    它可能是浏览器缓存问题,请尝试使用以下html .

    <link rel="shortcut icon" href="@routes.Assets.versioned("images/favicon.png")">
    

相关问题