From 06d67835e437118f2bb123f56c4a6c2b7799a81c Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 15 Sep 2016 10:21:12 +0100 Subject: [PATCH] Don't redirect Google to nocdn=true, and remove canonical URL until we sort out translated domains --- services/web/app/views/layout.jade | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/web/app/views/layout.jade b/services/web/app/views/layout.jade index 7d986e5abf..30b6b2294b 100644 --- a/services/web/app/views/layout.jade +++ b/services/web/app/views/layout.jade @@ -21,7 +21,6 @@ html(itemscope, itemtype='http://schema.org/Product') link(rel="icon", href="/favicon.ico") link(rel='stylesheet', href=buildCssPath('/style.css')) - link(rel="canonical", href=settings.siteUrl+currentUrl) if settings.i18n.subdomainLang each subdomainDetails in settings.i18n.subdomainLang if !subdomainDetails.hide @@ -58,7 +57,7 @@ html(itemscope, itemtype='http://schema.org/Product') var noCdnKey = "nocdn=true" var cdnBlocked = typeof jQuery === 'undefined' var noCdnAlreadyInUrl = window.location.href.indexOf(noCdnKey) != -1 //prevent loops - if (cdnBlocked && !noCdnAlreadyInUrl) { + if (cdnBlocked && !noCdnAlreadyInUrl && navigator.userAgent.indexOf("Googlebot") == -1) { window.location.search += '&'+noCdnKey; } script(src=buildJsPath("libs/angular-1.3.15.min.js", {fingerprint:false}))