0

I am using mvc razor to display the contents in a page. I have model with multiple items i am looping the model and display values.If I change a value in chrome and reload the same page in Firefox it is not refreshing the new value,but it is not working vice versa.If i use Hard refresh(ctrl+F5) it is working in Firefox

I try to add onload script to refresh the page

@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)"" />
                }
        }   
        }
}

Value is not refreshing in firefox. Hard refresh working for me but i tried to setup that in about:config using browser.cache.disk.enable = false and browser.cache.memory.enable = false it is not working

Manil
  • 30
  • 9
  • So if you do a hard refresh on firefox it is working? If so then you would have to configure firefox to stop caching. https://stackoverflow.com/questions/289751/how-to-turn-off-caching-on-firefox – vsarunov Jun 12 '19 at 05:43
  • Possible duplicate of [How to turn off caching on Firefox?](https://stackoverflow.com/questions/289751/how-to-turn-off-caching-on-firefox) – vsarunov Jun 12 '19 at 05:43
  • Why you have so much `C#` code in your view? That was tough to read. – SᴇM Jun 12 '19 at 05:45
  • Have you tried https://stackoverflow.com/a/47433869/34092 ? – mjwills Jun 12 '19 at 05:47
  • @vsarunov I tried to disable the cache and it is working fine, but it is affecting my entire page that load in Firefox. I want check is there any way to configure for a single page – Manil Jun 12 '19 at 06:20
  • @SᴇM-I ts configurable page.User can configure the page that's why we are using like this – Manil Jun 12 '19 at 06:21
  • @mjwills If try like this it will affect my chrome users also right? – Manil Jun 12 '19 at 06:22
  • Sure - but not in a negative way @Manil. – mjwills Jun 12 '19 at 06:22

0 Answers0