Skip to content

Commit 4497305

Browse files
donkermitchelsellers
authored andcommitted
If in debug mode then use the unix timestamp as cdv version to force the browser to keep refreshing client dependencies
1 parent 208c996 commit 4497305

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

DNN Platform/DotNetNuke.Web.Client.ResourceManager/ClientResourceController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,9 @@ public string RenderDependencies(ResourceType resourceType, string provider, str
283283
});
284284
}
285285

286-
return string.Join(string.Empty, sortedList.Select(resource => resource.Render(this.crmVersion, this.hostSettings.CdnEnabled, applicationPath)));
286+
var crmVersion = this.hostSettings.DebugMode ? DateTimeOffset.UtcNow.ToUnixTimeSeconds() : this.crmVersion;
287+
288+
return string.Join(string.Empty, sortedList.Select(resource => resource.Render(unchecked((int)crmVersion), this.hostSettings.CdnEnabled, applicationPath)));
287289
}
288290

289291
private List<T> AddResource<T>(List<T> resources, T resource)

0 commit comments

Comments
 (0)