James Royal-Lawson, webbstrateg, web manager och webbkonsultBeantin
Close
QR Code containing James Royal-Lawson's contact details as a MeCard.
RSS Feed, alternative webmaster centralSubscribe to the Beantin RSS Feed Google Profile for James Royal-Lawson View James Royal-Lawson's Google Profile+ LinkedIn Profile James Royal-Lawson, webbstrategView James Royal-Lawson's Linked in profile Twitter: web consultant James Royal-LawsonFollow James Royal-Lawson on Twitter Facebook Beantin fan pageBecome a Beantin fan on Facebook The Beantin Index, Swedish websites graded and rankedThe Beantin Index Beta blog, experiments, tests, investigationsBeantin Beta Blog YouTube Webbkommunikation videosBeantin videos on You Tube UXPodcast with James Royal-Lawson and Per AxbomUXPodcast with James Royal-Lawson and Per Axbom

Beantin

59.2799; 18.0899
Webbstrateg

Posts by James Royal-Lawson tagged with tips

Beantin Webbkommunikation is +46735931654, Stockholm-based digital strategist and web managerwebbkonsult, webbrådgivare

On this blog you can find articles that cover web strategy webbstrategi, intranets intranät, trends (often with a Swedish twist), analytics, and running an effective web presence. Check out my most popular posts.

The complete website redesign: why you should avoid it

Never do a complete redesign & rewrite of your website in one go.

Many companies are still locked in a 3-5 year redesign cycle - a point is reached when the unhappiness with their website reaches such a level that a total redesign is ordered.

Continue reading »

Google Analytics: 7 things to do when you first start

If you are starting out with Google Analytics for a site (or sites), then there are a few first steps you should follow. Here are 7 tips to get you up and running…

Continue reading »

Facebook Places: how to set who can see you

Facebook Places is continuing to roll-out across the world. Today it was launched in the nordic countries of Sweden, Denmark and Norway. To help you maintain a bit of control over your information and who gets to see where you’ve checked into I’ve created this guide.

Continue reading »

Best practice: Updating videos on YouTube

It’s not actually possible to upload new versions and “update” a video clip on YouTube. As someone who helps managers a number of websites for various clients, it’s not unusual for me to receive an email that says “Can you remove [video] from our YouTube account. We’ve got a new version to replace it”.

Continue reading »

Introducing: The Beantin Beta Blog

As part of my work as a web consultant most days I end up investigating, testing, playing, learnng or reminding myself about some web related thing or another. On many occasion I’ve wanted to let you in on those little journeys and even though I do, 140 characters isn’t always enough, and a detailed beantin.se blog post is overkill.

Screenshot of The Beantin Beta Blog

I needed somewhere a little less formal, more tips, and less opinion - so the Beantin Beta Blog was born.

Your own, personal, webmaster

My hope is that this additional blog will be the blog of the webmaster who is sitting by your side. The beta blog is going to be raw, possibly even wrong at times, but useful. It will hopefully have a similar mix of technical and non-techncial as this blog, although i’m not promising anything. So those of you who are a little less technical, hold tight just in case.

Beantin Manifesto

It will also help me keep the promise of my (soon to be published) Beantin manifesto – Increase openness, share knowledge, and help horizontally link the numerous skills needed to do web stuff and to do it well.

Search-engine friendly country site select boxes

Design often has the final say in a redesign project - or at best, a very powerful voice - which isn’t always a good, or acceptable, situation.

Recently I was part of a project where I needed to preserve an aspect of the old design for SEO reasons. The new design had included a select box, but I needed those “options” to be real links that would pass link-love. So, I offered this search-engine friendly solution.

Country links

Country links on the original website

To give a bit more background, the old site had a footer that contained links to every single country site within the organisation. This was about 26 links. On every page of the site. Most of those country sites had a similar footer, making most of the links reciprocal. That’s quite an international network of inter-linked international top level domains.

I obviously wanted to maintain that network of links after the redesign. It clearly wasn’t going to help the position of any of the sites in SERPs by removing them.

Country select box

Choose your country site select box

The design that was produced had “simplified” the list of countries in the footer to be a select box drop down menu. Although this is not unusual for companies with multiple country sites, it’s not always a good thing for usability (I like populating the select box using geolocation as a solution - but that would be another blog post!) and it’s really not a good thing for search engines.

No link-love for select boxes

Although Google has indexed text in select boxes for a number of years, and also indexes (new) URLs that is discovers within those lists, it doesn’t pass any pagerank to those links. Neither does it attribute the anchor text (or more correctly in this case: option text) to the destination link.

This obviously meant that the international network of inter-linked top level domains would come crashing down to the ground. Not really something that was on the list of requirements…

Country sites as a linked list

So in order to preserve the link network, and to honour the design decision, I decided to re-introduce the <a> link list of countries, and in order to not make this visible to (most) end-users, I set it to “display:none”.

Now hold on I can hear you say. Doesn’t Google (and other search engines) consider adding “display:none” to things as cloaking? Well, not necessarily. The key is whether there is a mechanism for making the content visible to visitors or not.

So in order to keep both the search engines and users happy what I did was add the “display:none” only if javascript is enabled. That way we are always serving the same HTML content to all visitors and search-engines, but making parts of it invisible when viewed in the browser by most visitors. Importantly, we are letting the search engines see and index all the links to the countries.

Adding a class

Add a js class to the country link list, or whatever element of the page you want to be hidden when javascript is enabled.

<div class="js">

Include an external js file

Add a link to an external script directly after your CSS styles (you may already have such an external file already)

<script type="text/javascript" src="/script/functions.js">

</script>

Document.write

in that script add a document write to write the additional css style link

document.write('<link rel="stylesheet" 

href="/styles/js-enabled.css"
type="text/css" media="screen" />');

Display:none

Finally, your js css file. Add the “js” class styling with display:none there.

.js {
display: none;
}

There are other ways you could achieve the same result; especially if you’re already using an Ajax library such as jquery, but I thought it was good to share with you an example that didn’t force the introduction of that overhead.

Cloaking

Yes, you could argue that this is technically cloaking, but it is better to say that we are offering enhanced content to those with javascript disabled. By doing this we are cloaking in a way that is helping Google and visitors who find long lists within select boxes difficult to use.


This work by James Royal-Lawson
is licensed under a
Creative Commons Attribution 2.5 Sweden License