Memaparkan catatan dengan label Javascript. Papar semua catatan
Memaparkan catatan dengan label Javascript. Papar semua catatan

Jumaat, 11 Januari 2013

Blogspot tld country redirect affecting SEO

Huuh, i'm a blogger but rare to posting XD. Okay to the topic, blogspot top level domain country redirect affecting SEO, what is tld country redirect?, and why it's affecting SEO?, tld is top level domain, in country and, top level domain in country redirect means, like this: if you try opening your blog with domain blogspot, it's like http://ourblog.blogspot.com, but if you're in india, or in some specific country, the domain wil redirected to http://ourblog.blogspot.in . In domain is a top level domain in India. This things can affecting seo because, your URL will be changed in specific country, and it means, your blog have unique URL and visitor, just like google, Google in some country has a specific domain, and check in alexa ranking, the rank is unique, in alexa you'll found your blog with unique domain. So this thing is very annoying, because your blog SEO will be bad, and other thing is internal and external linking, if you use a script for disable country redirect, your blog is .com, but the blogger XHTML will still .in, .be, .co.uk, so that is very affecting, and also for google pagerank. So conclusion buy a top level domain! XD. Just joke, the only one thing for save your blog SEO is use script for disable country redirect, but it will affecting to internal and external linking on your blog. If you want the script, just place this script after code <head> on your blog html.

The script

Copy this code, and paste after <head> tag on your blog HTML, don't forget to backup your template, for safety.

<script type='text/javascript'>
var blog = document.location.hostname;
var slug = document.location.pathname;
var ctld = blog.substr(blog.lastIndexOf(&quot;.&quot;));
if (ctld != &quot;.com&quot;) {
var ncr = &quot;http://&quot; + blog.substr(0, blog.indexOf(&quot;.&quot;));
ncr += &quot;.blogspot.com/ncr&quot; + slug;
window.location.replace(ncr);
}
</script>

Khamis, 8 November 2012

Disable highlighting text script blogger

This article it's just about how to disable highlighting script for blogger. Because sometimes blogger doesn't like its article is plagiated. And the advantage of this script, your textarea, input, scroll will not effected. But the disadvantage is just if you have a blog with about coding, maybe the visitor will can't be highlight or copying your code. Ok this is easy....

Tutorial

Just add this code to a widget, or open blogger.com, select blog, click layout tab, add widget text/HTML, paste this code and save.

<script type="text/javascript">

/***********************************************
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}

</script>
Ok just that, you are finish