【发布时间】:2016-02-25 23:31:27
【问题描述】:
参考这个post
我需要设置 http 标头。如何在 Magento 中做到这一点?我可以在哪里设置http标头? mangento 中是否有任何程序可以做到这一点?
【问题讨论】:
参考这个post
我需要设置 http 标头。如何在 Magento 中做到这一点?我可以在哪里设置http标头? mangento 中是否有任何程序可以做到这一点?
【问题讨论】:
你需要更清楚地知道你想要这个标题吗?
如果你想在每个页面上都这样做,那么你可以编写一个观察者并监听一个像 predispatch 这样的事件并在那里设置你的 http 标头..
或者,您也可以尝试使用 htaccess 来实现。 尝试将其插入到您的 htaccess 文件中..
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "0"
要检查,您可以加载网站的任何页面,然后使用网络选项卡检查标题..
【讨论】: