Sitecore的:打开HTML缓存块回发行 [英] Sitecore: Turning on HTML Caching blocks postback behavior

查看:125
本文介绍了Sitecore的:打开HTML缓存块回发行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Sitecore的页面与ASP的DropDownList和表单上的数据是从下拉列表中选定值填充。当DropDownList的选定项目发生变化时,回传被触发。在回传,新选定的项目将被添加到查询字符串,用户被重定向(用于链接性)。

I have a sitecore page with an ASP dropdownlist, and the data on the form is populated from the selected value of the dropdown. When the selected item of the dropdownlist is changed, a postback is fired. In the postback, the new selected item is added to the querystring and the user is redirected (for linkability).

我最近启用HTML缓存(适用于所有sublayouts,由查询字符串和而不同),现在突然,这种机制不再起作用。有什么事发生的是我选择一个新的下拉列表项目时,页面出现回发(虽然如果我调试,没有我的断点被击中)。之后,如果我再次更改所选的项目,我可以看到萤火虫__doPostBack没有定义的消息,这似乎意味着没有被添加到页面的ASP生成的JavaScript。

I recently enabled HTML caching (for all sublayouts, "Vary by querystring"), and now suddenly, this mechanism no longer works. What seems to happen is I select a new dropdown item, the page appears to post back (though if I'm debugging, none of my breakpoints get hit). After that, if I change the selected item again, I can see in Firebug the message "__doPostBack is not defined", which appears to mean the ASP-generated JavaScript is not being added to the page.

推荐答案

对于sublayout启用缓存意味着你完全绕过code和Sitecore的只是服务了它产生的previously相同的HTML。所以它表现为设计的。换句话说,这似乎并没有被这样一个场景,你可以采取sublayout缓存的优势。

Enabling caching for a sublayout means you are bypassing the code entirely and Sitecore is just serving up the same HTML it generated previously. So it's behaving as designed. In other words, this does not seem to be a scenario where you can take advantage of sublayout caching.

这篇关于Sitecore的:打开HTML缓存块回发行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆