
03-29-2020, 03:20 PM
|
 |
Paid Member
|
|
Join Date: Oct 2017
Posts: 11
|
|
NoIndexSS.js Question
Hi There. I have been using Ecwid now for about 1.5 years and really like it. I do not use the starter site you provide. I instead use my own hosting with your script plugged into my index.html file. I dont even use a CMS, just a simple setup. Regardless, I have enabled long ago the NoIndexSS app so that my starter site is not indexed, and that seems to be working just fine. Here is my question though. I am trying to cleanup my GTMetrix/Google scores etc, and was wondering if I could host the noindexSS.js file on my own server locally? It looks like the code is:
Ecwid.isStarterSiteIdPresent = function(element, cls) {
return (document.querySelector(cls)) !== null;
}
Ecwid.checkAndAddMetaNoIndex = function(){
var body = document.getElementById("ecwid_body");
var ids = ['#ecwid-starter-site-links'];
var e = document.createElement('meta');
e.setAttribute('name','robots');
e.setAttribute('content','noindex, nofollow');
e.setAttribute('id','noIndexApp');
for(var i = 0; i < ids.length; i++) {
if(Ecwid.isStarterSiteIdPresent(body, ids[i]) && document.getElementById('noIndexApp') == null) {
document.getElementsByTagName('head')[0].appendChild(e);
}
}
}
setTimeout(Ecwid.checkAndAddMetaNoIndex,50);
Can I just add that js code to my server and host it locally and turn off the app in Ecwid? Would my site starter site still be removed from indexing as I do need it to be? Or will doing this create a problem? Thanks for any thoughts you can provide!
|