in previous question trying work out why site slow. there answered correctly according fiddler screenshot below, javascripts on page being loaded cachebuster parameter!
as far can tell, references javascripts below plain vanilla no tricks. included individually , part of bundle. view quite intricate dashboard, lots of partial views , multithreaded scripts load various different widgets. cannot imagine why have thought put in cachebuster.
is there hidden tripwire 1 of programmers might accidentally have stumbled over, make have cachebuster? idea how read fiddler report can tell particular view triggering cachebusters?
edit: experimenting renaming bundles , calls thereto, found offending file _layout.cshtml
. loads scripts normally, , cachebuster. actual code:
<body id="mainlayout"> @styles.render("~/content/themes/base/css", "~/content/css") @scripts.render("~/bundles/modernizr") @scripts.render("~/bundles/jquery") @scripts.render("~/bundles/jqueryval") ... etc ...
nothing untoward that, right? view based on _layout have in order force scripts use cachebuster?
edit: identical problem described on kendo ui forums (unresolved @ writing). here's our javascript code triggers problem:
$(document).ready(function () { if ('@viewbag.loaded' != 'y') { $.ajax({ type: 'post', url: "/crcdashboard/loadcrcdashboard", success: function (data) { $("#mainlayout").html(data); }, error: function (jqxhr, textstatus, errorthrown) { alert(errorthrown); } }); } ... }
eventually turned out kendo found bug in tabstrip control.
we used different workaround restructuring views , getting postback data partial view. either or using suggested solution (explicitly setting cache true) work.
Comments
Post a Comment