Just Info Set all the links in your blog to open in a new window - except if you use AdSense!
Saturday, 19 January 2019
Adsense,
Article,
Blogger,
HTML,
Post Editor,
ZZ - needs 2017 theme review
Edit
You can set your blog up so that all clicked links open in a new page. But this is not a good idea if you are an AdSense publisher - this article explains why.
Blogger's Post Editor has a tool for changing some text into a link - and it's been much easier to use since they added a check-box turns the "open on a new tab / window" option on/of. If you tick this option, then the post-editor automatically adds target="_blank" (the HTML code for this) to your link.
For example
There are ways to do this, provided you're willing to accept the disadvantages of editing your template - this explanation shows how to do it. Although this approach works, the advice in the help-forum usually includes a warning to think very carefully about whether you really want your visitors to see a new page whenever they look at your own "about" page or one of your older posts.
Another option is to set the blog up so that only external links (ones to pages outside your own URL) open in a new window. To do this:
The last time I read AdSense's terms and conditions, it was very clear that when a user clicks on an AdSense ad in your site, the ad must open in the existing window: advertisers are paying for your viewers full attention, not to have them still thinking about YOUR website.
I'm no lawyer, but it seems clear to me that setting your links to automatically open in new pages would be a clear violation of this.
So based on this, I would recommend that
If this advice worries you, you may like to use an alternative advertising programme: it seems that Chitika, at least, does let you customise your ads in this way.
It's fine to open individual links on a new page - just don't do it for all of them.
Disclaimer: this advice is based on my interpretation of the Terms and Conditions. Caveat emptor. Always read the terms and conditions yourself, every publisher is responsible for making sure that their site complies.
Alternative advertising programmes
Copyright, blogs and bloggers
Advantages and disadvantages of editing your template
Extra customization of Chitika ads
Other tools you may like to use on your blog Sumber http://blogger-hints-and-tips.blogspot.com
Making links open in a new tab
Sometimes, you need to refer to outside material in your blog: your ability to quote it is controlled by copyright laws, so you may need to link to an outside source, rather than quoting it in full.Blogger's Post Editor has a tool for changing some text into a link - and it's been much easier to use since they added a check-box turns the "open on a new tab / window" option on/of. If you tick this option, then the post-editor automatically adds target="_blank" (the HTML code for this) to your link.
For example
< a href="www.blogger-hints-and-tips.blogspot.com"> Blogger-HAT's Home Page </a>becomes
< a href="www.blogger-hints-and-tips.blogspot.com" target="_blank"> Blogger-HAT's Home Page </a>
Doing it automatically
Occasionally there are requests in the Blogger Help Forum like"How can I make all the links in my blog open in a new window"These often cone from people new to Blogger who, understandably, want to keep the traffic on their site.
There are ways to do this, provided you're willing to accept the disadvantages of editing your template - this explanation shows how to do it. Although this approach works, the advice in the help-forum usually includes a warning to think very carefully about whether you really want your visitors to see a new page whenever they look at your own "about" page or one of your older posts.
Another option is to set the blog up so that only external links (ones to pages outside your own URL) open in a new window. To do this:
- Edit your template in the usual way.
- Find the </head> statement
- Put the following code immediately before the </head> statement - except don't add the purple line if you already have it somewhere else in your template.
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' type='text/javascript'></script> <script type='text/javascript'>
$(document).ready(function() {
$("a[href^='http://']").each(
function(){
if(this.href.indexOf(location.hostname) == -1) {
$(this).attr('target', '_blank');
}
}
);
$("a[href^='https://']").each(
function(){
if(this.href.indexOf(location.hostname) == -1) {
$(this).attr('target', '_blank');
}
}
);
});
</script>
It's not a good idea for AdSense publishers
The approaches described above work. But there is one issue that's often not mentioned: the relationship between this command, and the terms and conditions of other tools that you may be using on your blog.I'm no lawyer, but it seems clear to me that setting your links to automatically open in new pages would be a clear violation of this.
So based on this, I would recommend that
If you use AdSense,
Then don't install auto-new-page code into your template, and check that any 3rd party templates that you use don't have this feature either.
If this advice worries you, you may like to use an alternative advertising programme: it seems that Chitika, at least, does let you customise your ads in this way.
It's fine to open individual links on a new page - just don't do it for all of them.
Disclaimer: this advice is based on my interpretation of the Terms and Conditions. Caveat emptor. Always read the terms and conditions yourself, every publisher is responsible for making sure that their site complies.
Related Articles
Setting up AdSense on your blogAlternative advertising programmes
Copyright, blogs and bloggers
Advantages and disadvantages of editing your template
Extra customization of Chitika ads
Other tools you may like to use on your blog Sumber http://blogger-hints-and-tips.blogspot.com
0 Response to "Just Info Set all the links in your blog to open in a new window - except if you use AdSense!"
Post a Comment