diff --git a/media/js/mkt/fragments.js b/media/js/mkt/fragments.js index 97d131c227..1f3b737ac8 100644 --- a/media/js/mkt/fragments.js +++ b/media/js/mkt/fragments.js @@ -197,10 +197,18 @@ function fragmentFilter(el) { context: $('#page').data('context') }); + if (!href) { + href = z.context.uri; + console.log('whats the 411' + href); + } + // Do we have an instruction to clear a part of the fragment cache? var bustCookie = $.cookie('fcbust'); if (bustCookie) { - // The `fcbust` is a JSON-encoded list of strings. + // Clear out the `fcbust` cookie. + $.cookie('fcbust', null); + + // The `fcbust` cookie is a JSON-encoded list of strings. var decoded_prefixes = JSON.parse(bustCookie); for (var i = 0; i < decoded_prefixes.length; i++) { @@ -209,7 +217,7 @@ function fragmentFilter(el) { if (clear_prefix === '/') { // If the server is asking us to bust '/', we should just // perform a synchronous load of the page. - synchronousLoad(z.context.uri); + synchronousLoad(href); return; } @@ -224,9 +232,6 @@ function fragmentFilter(el) { delete fragmentCache[key]; }); }; - - // Clear out the `fcbust` cookie. - $.cookie('fcbust', null); } if (z.context.cache === 'cache') { @@ -241,11 +246,6 @@ function fragmentFilter(el) { console.log('performing synchronous load next navigation'); } - if (!href) { - href = z.context.uri; - console.log('whats the 411' + href); - } - // Clear jQuery's data attribute cache for body. jQuery.cache[document.body[jQuery.expando]].data = null;