我正在使用mvc剃刀在页面中显示内容。我有多个项目的模型,我正在循环模型并显示值。如果更改chrome中的值并在Firefox中重新加载同一页面,则不会刷新新值,但反之亦然。如果我使用硬刷新(ctrl + F5)在Firefox中运行
我尝试添加加载脚本来刷新页面
@model DecisioningModel
@helper RenderDecisionPageSection(ApplicationPageSectionData section,
SecurityPrincipal user, bool sectionNameRendered)
{
@if (section.Rows != null)
{
foreach (var row in section.Rows)
{
@foreach (var field in row.Fields)
{
var isDataElement = field.DataElement != null;
var groupName = field.selectedGroup != null ? field.selectedGroup.Name :
"";
var dataElementName = isDataElement && groupName != "" ? groupName + "-"
+ field.DataElement.Name : "";
var sectionName = field.SectionName;
var fieldLength = isDataElement && field.DataElement.FieldLength != null
? field.DataElement.FieldLength : 999;
<input type="text" @(Model.EnablePageFormulaJsPerfChanges ? "id=" +
field.Id : "id=" + inputId)
name="dataelement@(Model.DataElementId(field))"
class="@Model.CssClassForField(field, section, true)"@((field.IsDisabled)
?disabled=disabled" : "")"
@(section.CollectionType != "Stipulations" && (field.IsCalculated) ?
"readonly=readonly" : "") data-fieldid="@field.Id"
data-dataelementid="@Model.DataElementId(field)"" />
}
}
}
}
在Firefox中,值未刷新。强制刷新对我有用,但是我尝试使用browser.cache.disk.enable = false和browser.cache.memory.enable = false在about:config中进行设置,但它不起作用