开发者

IE's grip on cached content

I'm troublehooting an instance where IE8 is rendering cached data. FF & Chrome don't having problems keeping up.

The page flow goes like this...a dropdown list box selection is submitted and server side writes back a few fields based on the selection. Then other stuff happens. This is a multi-step checkout process - first step establishes the base...2nd step establishes optional features, 3rd steps submits the final.

All these steps happen within the a single .aspx page - jQuery is 'showing/hiding' different containers depending on the current step. It would be tempting to look for faults in server-side and/or ajax bits except for the fact that FF & Chrome work perfectly.

When IE users step thru that checkout flow a 2nd time the data is retained from the original checkout. (again...fine for FF and Chrome).

The dat开发者_如何学Goa that's not getting updated is generated server-side:

<div>
    Registering users for: <b>
        <%=Model.Webinar.Title %></b><br />
    <%=Model.Webinar.Presenter.FullName %><br />
    <b>
        <%=Html.DisplayDate(Model.Webinar.Date)%></b> - <i>
            <%=Html.DisplayTime(Model.Webinar.Date, timeZ, false)%>
            -
            <%=Html.DisplayTime(Model.Webinar.Date, Model.Webinar.Duration, timeZ)%><br />
        </i>
</div>

It's not form data...it's really, really strange how IE can be caching this so vigorously. I've tried adding a getDate() hidden field and the and have seen _some effect but not consistently, bullet-proof results.

I've seen a number of discussions around referencing IE and AJAX data but that shouldn't be coming into play here. Is there any other meta code to use?


I would set the appropriate HTTP headers to prevent caching in both the main page and the AJAX responses. Try:

Cache-Control: no-cache
Pragma: no-cache

Also, if these are form fields that are stale, it could be IE's auto-complete causing the issue. Try adding autocomplete="off" to form fields.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜