Tag: links

Dynamic Link Insertion via Unobtrusive External JavaScript

Posted on June 14, 2009 in Optimization by Jeff Starr

[ Dynamic Flow ] In my recent guest post at The Nexus, I discuss Google’s new nofollow policy and suggest several ways to deal with it. In that article, I explain how Google allegedly has changed the way it deals with nofollow links. Instead of transferring leftover nofollow juice to remaining dofollow links as they always have, Google now pours all that wonderful nofollow juice right down the drain. This shift in policy comes as a terrible surprise to many webmasters and SEO gurus, especially those who have invested vast amounts of time, effort and money engaging in supposedly lucrative PR-sculpting pursuits.

Of course, this new policy leaves many of us wondering how to deal with it. If (and it remains a big “if” until Google clarifies their position) — if nofollow link equity simply vanishes into the ether, the repercussions may be significant. For example, webmasters who now rely on nofollow to salvage link juice otherwise leaked through lengthy comment threads will need to devise another strategy or suffer an inevitable loss of valuable PageRank. There are many good strategies available, including everything from long-term reorganization of site structure to short-term fixes involving much-despised tricks such as iframes and JavaScript links. Personally, I wouldn’t touch iframes with a ten-foot pole, but in the case of an emergency, I certainly would take a look at using external JavaScript to get the job done.

Continue Reading

WordPress Tip: Valid, SEO-Friendly Email Permalink Buttons

Posted on April 12, 2009 in WordPress by Jeff Starr

[ ~{*}~ ] In addition to your choice collection of “Share This” links, you may also want to provide visitors with a link that enables them to quickly and easily send the URL permalink of any post to their friends via email. This is a great way to increase your readership and further your influence. Just copy & paste the following code into the desired location in your page template:

<a href="mailto:?subject=Fresh%20Linkage%20@%20Perishable%20Press&amp;body=Check%20out%20<?php the_permalink(); ?>%20from%20Perishable%20Press" title="Send a link to this post via email" rel="nofollow">Share this post via email</a>

Within the code, you will need to edit both instances of the string “Perishable%20Press” to reflect your own site name. Note that the “%20” is the encoded equivalent of a blank space, and is required to ensure validation of parameterized query strings. As is, the code will generate an email that is populated with the following information:

Continue Reading

Remove the WWW Prefix for all URLs via PHP

Posted on February 8, 2009 in Function by Jeff Starr

Canonical URLs are important for maintaining consistent linkage, reducing duplicate content issues, and increasing the overall integrity of your site. In addition to cleaning up trailing slashes and removing extraneous index.php and index.html strings, removing the www subdirectory prefix is an excellent way to shorten links and deliver consistent, canonical URLs.

Of course, an optimal way of removing (or adding) the www prefix is accomplished via HTAccess canonicalization:

Continue Reading

Unobtrusive JavaScript for ‘Print-This’ Links

Posted on February 1, 2009 in Function by Jeff Starr

One of the oldest JavaScript tricks in the book involves providing a “print this!” link for visitors that enables them to summon their operating system’s default print dialogue box to facilitate quick and easy printing of whatever page they happen to be viewing. With the old way of pulling this little stunt, we write this in the markup comprising the target “print this!” link in question:

<a href="javascript:window.print()">Print This!</a>

Big yuck there, of course, due to the obtrusive nature of the JavaScript implementation. Adhering to the principles of proper Web Standards, it is better practice to separate behavior from structure by placing this amazing “print this!” function in its own location, either in the <head> of the document or even better in an external JavaScript file. So basically, we want markup that looks more like this:

<a href="http://domain.tld/target/" title="Print this page">Print This!</a>

Notice the new value for the href attribute. Rather than pointing illogically to the JavaScript function, it now points to an actual resource, which may be anything you desire. Previously, users without JavaScript would click the “print this!” link and blink while nothing happens. With the unobtrusive technique, you provide the location to which users without JavaScript shall go. Possibilities here include an explanation page or even just the page itself, depending on how lazy you wanna be.

Continue Reading

Targeting External Links Intelligently

Posted on January 20, 2009 in Function by Bill Brown

In the beginning…

[ Young Planet Earth ] In the time of the dinosaurs, HTML authors controlled the way anchors opened by adding target="_blank" as an attribute on an anchor tag. Then the molten mass of Internet began to cool into the thin crust of Web 2.0, the continents began to separate and there came a great migration of pages from HTML to the shinier, new XHTML. Most authors didn’t know what that meant, but it had an “X” in it, so it must be cool, they thought.

Alas, there came a great despair as the beloved target="_blank" attribute was no longer looked kindly upon by The Great Validator. The new XHTML pages would not wear the Shiny Badge of Validation Love.

Continue Reading

Redirect All (Broken) Links from any Domain via HTAccess

Posted on December 31, 2008 in Function by Jeff Starr

Here’s the scene: you have been noticing a large number of 404 requests coming from a particular domain. You check it out and realize that the domain in question has a number of misdirected links to your site. The links may resemble legitimate URLs, but because of typographical errors, markup errors, or outdated references, they are broken, leading to nowhere on your site and producing a nice 404 error for every request. Ugh. Or, another painful scenario would be a single broken link on a highly popular site. For example, you may have one of your best posts mentioned in the SitePoint forums, but the person leaving the link completely botched the job:

Continue Reading

Unobtrusive JavaScript: 5 Ways to Remove Unwanted Focus Outlines

Posted on December 16, 2008 in Function by Jeff Starr

I recently wrote about how to remove unwanted link outlines using a pure-CSS method that works on every modern browser except (wait for it) ..Internet Explorer 6! Yes, that’s right, another reason why (almost) everyone is pushing hard to eliminate Internet Explorer from existence.

Nonetheless, removing those pesky unwanted link outlines in IE6 is not possible with CSS, but it’s a snap with a little JavaScript. Here are four unobtrusive JavaScript techniques (plus one CSS-only method thrown in for good measure) for removing unwanted focus outlines.

Continue Reading

Speed Linkin’ :: December 2008

Posted on December 10, 2008 in Nonsense by Jeff Starr

[ Official 'Speed Linkin' Icon ] Kicking things off for this month’s official Speed Linkin’ post is a site designed to help with all of your graphical background needs. Then, we move on to a lightweight forum plugin for WordPress. Ever feel lost when it comes to choosing the best lightbox script? Well it’s Ozh to the rescue with the excellent Lightbox Clones Matrix. Also handy is this incredible list of social media sites. As a big fan of ASCII art, I can spend hours playing with the enchanting ASCII-O-Matic. Here is another excellent tool for checking your site’s gzip compression. For a little SEO fun, you may benefit from learning about your site’s anchor index search results. If you are a heavy Tumblr user, you may want to backup your Tumblr posts. There is also a nice backup tool for your Twitter posts as well. Saving the best for last, check out the site redesign I recently threw down for graphics guru Thane Champie, aka 88teeth. Btw, huge thanks to Thane for providing the sweet “Speed Linkin’” graphic! :)

Backwards-Compatible Spam and Delete Buttons for WordPress

Posted on December 1, 2008 in WordPress by Jeff Starr

Recently, Joost de Valk shared an excellent technique for adding spam and delete buttons to comments on your WordPress-powered blog. The idea is to save administration time by providing links to either “spam” or “delete” individual comments without having to navigate through the WordPress admin area. Joost provides the following plug-n-play solution:

Continue Reading

Fully Valid, SEO-Friendly Social Media Links for WordPress

Posted on November 23, 2008 in WordPress by Jeff Starr

[ ~{*}~ ] With the explosion of social media, networking, and bookmarking services, there are a zillion ways to add “Share This Post” functionality to your WordPress-powered sites. In addition to the myriad services and plugins, we can also add these links directly, using nothing more than a little markup and a few choice PHP snippets. Such individual links provide full control over the selection, layout, and styling of each link without requiring the installation of yet another WordPress plugin.

This article shares SEO-friendly code snippets for ten of the most popular social media sites using completely valid XHMTL-Strict markup. All of the following code snippets feature:

Continue Reading

Flashforward: Exclusive Interview with Aaron Wall

Posted on August 27, 2008 in Blogging by Jeff Starr

Aaron Wall on SEO, the future of the Web, Google dominance, and life as a professional taste tester

As someone who keeps a close eye on the mystical world of Search Engine Optimization, one of my favorite sources of information is SEO-guru Aaron Wall. Aaron is the author of the immensely popular SEOBook.com, where he shares his knowledge, ideas, and opinions on a wide range of SEO-related topics. I have always admired the direct, informative way in which Aaron presents his content, which itself is always insightful and intriguing. Having read much of Aaron’s thoughts on SEO and marketing, I wanted to “zoom out” and ask Aaron a few questions about the possible future of SEO and life on the Web in general. Recently, Aaron was generous enough to respond to some of these rather eclectic questions, including some interesting “behind-the-scenes” questions revealing how Aaron works on the Web..

Continue Reading

WordPress Tip: Link Author Comments to the Home Page

Posted on July 14, 2008 in WordPress by Jeff Starr

[ ~{*}~ ] After almost three years of blogging here at Perishable Press, I had an epiphany about my author comment links. Way back when, after installing WordPress in a subdirectory called “/press/”, I decided to set the URL for my Administrative User Profile’s website as “http://perishablepress.com/press/”. After all, it seemed to make sense at the time, plus it really didn’t seem to matter; nobody was going to see my personal profile information anyway, right?

Wrong.

Three years later, I finally realize that it does matter. The URL that you enter as your profile’s website address is the URL that will be used for every author commentator link on your site. Yes, I know what you’re probably thinking, “what an idiot! I thought everybody knew that!” Well, no, obviously not everybody. It may have occurred to me momentarily or subconsciously at some point along the way, but it wasn’t until just a few days ago that the light bulb finally flashed.

So what’s the big deal? First and foremost, one of the most highly visible and prevalent links to your site comes from your own author commentator links. These links are used to represent your site for every one of your own comments. Other commentators and visitors recognize the link, note the location, and possibly use it when linking back to your site. Thus, it is important to represent your site by linking to the optimal URL in your author commentator links.

Continue Reading

Sharpen Your Site by Removing Unwanted Link Border Outlines

Posted on June 10, 2008 in Presentation by Jeff Starr

Lately I have noticed several sites that display those unsightly dotted outlines on high-profile link elements. Typically, these link outlines plague various header elements such as banner images, navigational links, and other key features. This behavior frequently haunts highly graphical site designs and is often associated with various image replacement methods that position the original anchor text offscreen, generally far beyond the left edge of the browser window. When visible, such presentations display a ghastly, four-sided dotted border that wraps the linked element and then continues to stretch to the left-hand side of the browser window. Here are a few examples of live websites demonstrating this distracting behavior 1 (btw, no offense meant to any of these sites — they are all great — they just happen to provide good examples!):

Continue Reading

Consolidate and Localize Your WordPress Feeds

Posted on May 26, 2008 in WordPress by Jeff Starr

[ ~{*}~ ] Recently, I found occasion to consolidate and localize my WordPress feeds. A couple of years ago, shortly after I first began using Feedburner to deliver and monitor my site’s feeds, I began listing my Feedburner-assigned feed URL in addition to my localized WordPress feed URL. As time went on, inconsistent feed linkage here at Perishable Press had greatly convoluted the feed-subscription process. Confounding factors include:

Continue Reading

Universal www-Canonicalization via htaccess

Posted on April 30, 2008 in Function by Jeff Starr

[ ~{*}~ ] During my previous rendezvous involving comprehensive canonicalization for WordPress, I offer my personally customized technique for ensuring consistently precise and accurate URL delivery. That particular method targets WordPress exclusively (although the logic could be manipulated for general use), and requires a bit of editing to adapt the code to each particular configuration. In this follow-up tutorial, I present a basic www-canonicalization technique that accomplishes the following:

  • requires or removes the www prefix for all URLs
  • absolutely no editing when requiring the www prefix
  • minimal amount of editing when removing the www prefix
  • minimal amount of code used to execute either technique

I have found this “universal” www-canonicalization technique extremely useful in its simplicity and elegance. Especially when requiring the www prefix, nothing could be easier: simply copy, paste, done — absolutely no hard-coding necessary!

Continue Reading

Open External Links as Blank Targets via Unobtrusive JavaScript

Posted on November 20, 2007 in Function by Jeff Starr

Beginning with this article, I am serving up a short series of unobtrusive JavaScript functions that I use to enhance the functionality of Perishable Press. In this post, I present a comprehensive JavaScript method of opening external links in new windows (or tabs, depending on the browser).

One way of opening links in new windows is to insert the HTML target="_blank" attribute into all necessary anchor elements (<a href=""></a>). This method works well, but generates validation errors when used with XHTML-Strict doctypes.

A better solution is to employ some unobtrusive JavaScript to progressively enhance your documents with “blank-target” functionality. Using the following code, 99% of your visitors (those with JavaScript) will enjoy external links opening in new windows, while the remaining 1% of your audience (those without JavaScript) will enjoy your site without even realizing they are missing out on those wonderful blank-targeted links. It’s a “win-win” situation ;)

Continue Reading

WordPress Lessons Learned, Part 1: Permalink Structure

Posted on November 5, 2007 in WordPress by Jeff Starr

While planning my current site renovation project, I considered changing the format of my permalinks. Reasons for modifying the permalink structure of a site include:

  • Optimizing URLs for the search engines
  • Simplifying URL structure for improved readability
  • Removing the implication that your site content is somehow organized chronologically
  • Removing other unwanted organizational implications (e.g., categorically, topically, etc.)

Like many people who configured WordPress permalinks a couple of years ago, I chose to include the day, month, and year along with the blog URL and post title. For over two years now, Perishable Press has employed the following permalink format:

Continue Reading

Notes and Tips for Better Social Bookmarking

Posted on September 26, 2007 in Blogging, Pleasure by Jeff Starr

For those of you still hiding your bookmarks within the dark confines of your browser’s “favorites” menu, may I suggest stepping into the “here and now” with a fresh new approach: social bookmarking. Hopefully, most of my readers are already familiar with the many wonders of managing and sharing your bookmarks online, but for those who may still be questioning the whole idea, allow me to expound briefly on several of the immediate benefits:

Universal access to your bookmarked sites
Forget about time-wasting browser extensions that fumble to synchronize your business; manage your collection online at a great site such as del.icio.us and enjoy quick access to a definitive set of bookmarks from virtually anywhere in the world.
Better organization of your bookmarks
Drop the resource-hogging browser extensions that supposedly enhance the organizational efficiency of your collection; many social bookmarking sites employ user-defined tagging architecture to provide unlimited flexibility for organizing your bookmarks.
Don’t be tight with your bookmarks
Sharing information is the wave of the future! Help others locate the information they need by sharing your favorite sites with others. Social bookmarking sites like del.icio.us provide a simple way to keep select sites private, so get over yourself and get sharing!
One-click backups of your entire collection
Last but not least is the drop-dead simple method that most social-bookmarking sites provide for backing up or exporting your entire bookmark collection. For example, with a single click, del.icio.us exports your entire collection via a nice little html file. Fresh. Delivered.

Ahh.. so much better. If you still don’t believe me, then just stop reading here and go home. However, if you are totally feeling the whole social bookmarking movement, then read on, my friend — I have a few sweet little tips that I would like to share with you..

Continue Reading

Hacking WordPress: The Ultimate Nofollow Blacklist

Posted on September 19, 2007 in Function, WordPress by Jeff Starr

[ Image: Death-metal rocker drunk with power ] Several days ago, I posted an article explaining how to hack your own WordPress nofollow blacklist. Immediately thereafter, I published an elaborate article focusing on automatic methods of nofollow blacklisting via WordPress plugins. In this article, I expand on the original blacklist hack by incorporating functional differentiation between commentator links, trackbacks, and pingbacks. If anything, think of this as an exercise in hacking WordPress, rewarding in and of itself, if not otherwise entirely impractical. Of course, whenever possible, you should avoid hacking the WordPress core and install a plugin instead. ;) Nonetheless, it’s so much fun to hack that we simply could not resist posting just one more article involving nofollow attributes. But alas, we really should be moving along..

Continue Reading

Hacking WordPress: Dofollow Whitelist for Commentator Links

Posted on September 18, 2007 in Function, WordPress by Jeff Starr

[ Image: Inverted Eye Detail ] Before repenting of my filthy “nofollow” addiction, I experimented briefly with a “dofollow whitelist” for commentator URL links. The idea behind the whitelist is to reward frequent commentators, feed subscribers, site patrons, and other guests by selectively removing the automatically generated nofollow attributes from their associated comment-author links. For nofollow enthusiasts, a dofollow whitelist is a great way to show appreciation for people who support your blogging efforts.

Now, before we go hacking away at WordPress, keep in mind that there are a few potential shortcomings to this method. First of all, manually maintaining such a list would eventually fail. It simply would require too much work. Perhaps as an automated WordPress plugin, a dofollow whitelist would be a reasonable solution. A dofollow whitelist plugin would also eliminate the need to hack the WordPress core, which the following hack definitely requires. Other issues involve duplicate author names and user verification. Nonetheless, even as an elementary WordPress hack, a dofollow whitelist for comment signature links may prove useful. Here are a few examples:

Continue Reading

Hacking WordPress: Nofollow Blacklist for Commentator Links

Posted on September 12, 2007 in Function, WordPress by Jeff Starr

[ Image: Extreme close-up of an eye (send email  to purchase a full-size version) ] Previously, in our unofficial “WordPress dofollow upgrade” series, we dished several techniques for removing the antisocial nofollow attributes from default installations of WordPress. After an exhaustive review of available dofollow plugins, we explained how drop-dead easy it is to transform any WordPress blog into a well-standing member of the dofollow community without relying on a plugin to do the job. Our next article detailed a nofollow removal hack selectively targeting pingbacks, trackbacks, and commentator links. Then, we went off the deep end with a robust, threefold hack for sitewide nofollow extermination. Now, in this article, we merge several of these methods to implement a “nofollow blacklist” for trackback, pingback, and commentator links.

Why would you want to create a nofollow blacklist? There are several scenarios in which such a strategy would benefit a dofollow-friendly WordPress site. After upgrading to dofollow status, you should experience an increase in the number of comments left at your site. Although this is generally beneficial, there remain those gutless worms who would seek to game your generous link-love with hollow remarks, empty chatter, and other useless nonsense. Rather than waste pagerank and make a big stink, quietly blacklist offenders until they change their mindless ways. Simply put, a nofollow blacklist protects your dofollow site while reinforcing positive comments.

Continue Reading

Industrial Strength WordPress Dofollow Upgrade

Posted on September 11, 2007 in Function, WordPress by Jeff Starr

Encourage Comments by Completely Eliminating All Nofollow Links

Want to remove all traces of the hideous nofollow attribute without having to install yet another unnecessary plugin? By default, WordPress generates nofollow links in three different ways — this article will show you how to eliminate all of them..

Some context please..

Note: if you are already familiar with the various functions involved in the nofollow-removal process, please feel free to skip the proceeding discussion and jump directly to the tutorial.

WordPress adds nofollow to all trackbacks, pingbacks, and commentator links

We have seen how simple it is to eradicate nofollow from comment-related content, which includes the three different types of $author URLs: trackbacks, pingbacks, and commentator links. In fact, WordPress generates hyperlinks for each of these comment-author URLs via the function get_comment_author_link(), which is conveniently located in the file wp-includes/comment-functions.php in WordPress 2.0 and wp-includes/comment-template.php in WordPress 2.1 and 2.2:

Continue Reading

The Deluxe One-Minute Dofollow WordPress Upgrade

Posted on September 10, 2007 in Function, WordPress by Jeff Starr

After our previous article, we all know how easy it is to kill the default nofollow attributes that WordPress automatically injects into all commentator, trackback, and pingback links. Indeed, our original one-minute upgrade delivers dofollow links across the board, effectively passing the love juice to every type of response. Fine for some, but some need more..

In this article, we improve the original dofollow upgrade by differentiating between the three different response types. With our “deluxe” model, nofollow attributes may be removed selectively from trackbacks, pingbacks, commentator links, or any combination thereof. For example, you may remove nofollow from commentator links while dishing full juice to trackbacks and pingbacks.

Ready? Let’s do this thing..

Continue Reading