Published: September 14, 2022
As Google gets smarter, it’s becoming increasingly expectant that SEO’s should become more flexible and holistic in their approach to web optimisation.
In that spirit, taking time out to find better and more efficient ways of doing day to day tasks is something I find myself doing regularly. I’ve tried tons of tools, worked with dozens of fellow SEO’s and I still firmly believe that bookmarklets have a place in a search marketer’s repertoire.
So, I’ve tried and tested the best that the web has to offer and whittled down 15 of the most useful bookmarklets that you can use right now!
Well, bookmarklets have pretty much been around since the inception of JavaScript in 1995. In short, they are tiny scripts packed into a bookmark that perform a command within a browser to add a little nugget of functionality.
In other words, they perform similar actions to chrome extensions without the crippling browser slowness and they rock 🤘.
It’s super easy.
Copy the bookmarklet script you’ve found, right-click on your bookmark bar (or press CTRL + D or CMD + D on mac), click ‘add page’:
Then paste the code into the ‘URL’ field, name it whatever you like and click ‘save’:
Done.
The following code will perform a Wikipedia search for any text you have highlighted on any web page. Pop it in your bookmark bar (using the instructions above) and highlight any word on this page and then click the bookmarklet in your bookmark bar.
Script (source):
javascript: (function() {
function se(d) {
return d.selection ? d.selection.createRange().text : d.getSelection()
}
s = se(document);
for (i = 0; i < frames.length && !s; i++) s = se(frames[i].document);
if (!s || s == '') s = prompt('Enter%20search%20terms%20for%20Wikipedia', '');
open('https://en.wikipedia.org' + (s ? '/w/index.php?title=Special:Search&search=' + encodeURIComponent(s) : '')).focus();
})();
Cool right?
Now I’ve converted you to bookmarklet love 😍, here’s 15 of the best bookmarklets for SEO’s. Some you will use on the regular while others you might not use for a while. I’ve included all my favourites that I use often.
Note: Although i’ve tested and use every one of these, some popup blockers might affect how each bookmarklets works. If it’s not working, check your adblocker.
If the URL you once visited doesn’t exist anymore, has been deleted by a foolish colleague or you need to look back at the contents of an old page to inform a 301 redirect, this one is really useful.
Script (source):
javascript:location.href='https://web.archive.org/web/*/'+location.href2. List every link on the page
Short, sweet, mega useful. One click and get all hyperlinks from a web page in a window. I use this regularly in combination with screaming frog for super fast insight.
Script (source):
javascript: (function() {
var a = '';
for (var ln = 0; ln < document.links.length; ln++) {
var lk = document.links[ln];
a += ln + ': <a href=\'' + lk + '\' title=\'' + lk.text + '\'>' + lk + '</a><br>\n';
};
w = window.open('', 'Links', 'scrollbars,resizable,width=400,height=600');
w.document.write(a);
})();
I’ve had clients in the past with serious cookie issues which have impacted site security, international targeting and even crawling! This is a one click action to see all content associated with cookies the site is running.
Script (source):
javascript: document.cookie = '';
function hjK(S4p) {
D3p = /; /g;
return S4p.replace(D3p, '<br><br>');
}
if (document.cookie.length < 1) {
alert('No cookie from this site!')
} else {
with((na = open('', '', '')).document) {
write(hjK('Cookie for ' + document.title.link(window.location.href) + ', dd. ' + new Date() + '<hr>' + document.cookie));
close()
}
}
This one will alert the last modified date of each document and each frameset, along with the names and the locations of each frame in a dialogue box. Ideal for competitor research and auditing.
Script (source):
javascript: javascript: function Lmi(w, p) {
var i, t = '';
for (i = 0; i < w.frames.length; i++) t += Lmi(w.frames[i], p + ' ');
return (p + w.document.lastModified + ' ' + w.location + ' ' + (w.name ? (' (' + w.name + ')') : '') + '\n' + t);
}
alert('Last modified:\n\n' + Lmi(window, ''));
The simplest bookmarklet for downloading SERP URLs. Set your google settings to return 100 results and you can grab the top 100 results for any query with one click. Combine it with your favourite crawler and you’ve got some great analysis tools.
Script (source):
javascript: var a = document.getElementsByTagName('a'),
arr = '';
for (var i = 0; i < a.length; i++)
if (a[i].ping && !a[i].href.includes('google')) arr += ('<p>' + a[i].href + '</p>');
var newWindow = window.open();
newWindow.document.write(arr);
newWindow.document.close();
Auditing duplicate content can be time consuming if there’s a lot. Use this bookmark as part of your audit to check snippets of content you believe to be unnecessarily duplicate. Copy and paste the snippet into the dialogue box and see roughly how often it appears across the site with a simply search operator.
Script (source):
javascript: (function() {
var targetUrl = 'https://www.google.com/search?q=';
new Promise(setQuery => {
var input = window.prompt('Enter your query:');
if (input) setQuery(input);
}).then(query => window.open(targetUrl + 'site:' + location.hostname + ' "' + query + '"'));
})();
Instantly load the URL that you’re viewing into pagespeed insights. If you want this to work with the homepage of site each time change the window.location. to window.location.host in the code below.
Script (source):
javascript:location.href='https://search.google.com/structured-data/testing-tool/u/0/#url='+window.location
This will only save you a few seconds but I use this bookmarklet a lot to start troubleshooting why a page isn’t doing well. The script will conduct a search using the ‘site:’ which should return the exact url in the first result if indexed.
Script (source):
javascript: (function() {
window.open('http://www.google.co.uk/search?q=site%3A' + encodeURIComponent(location.href))
})();
Change 3 clicks to 1 with an instant opener for the clearing browsing data. Most used when you’re testing a development or need to replicate a bug to report.
Script (source):
chrome://settings/clearBrowserData
Instantly check the number of times a word occurs on a page. This one is really good for checking keyword stuffing during an audit and being able to efficiently give stats.
Script (source):
javascript: (function() {
var T = {},
W = [],
C = 0,
s, i;
function F(n) {
var i, x, a, w, t = n.tagName;
if (n.nodeType == 3) {
a = n.data.toLowerCase().split(/[\s\(\)\:\,\.;\<\>\&\'\"]/);
for (i in a)
if (w = a[i]) {
w = " " + w;
T[w] = T[w] ? T[w] + 1 : 1;
++C;
}
}
if (t != "SCRIPT" && t != "STYLE")
for (i = 0; x = n.childNodes[i]; ++i) F(x)
}
F(document);
for (i in T) W.push([T[i], i]);
W.sort(function(a, b) {
var x = b[0] - a[0];
return x ? x : ((b[1] < a[1]) ? 1 : -1)
});
s = "<h3>" + C + " words</h3>";
for (i in W) s += W[i][0] + ":" + W[i][1] + "<br>";
with(open().document) {
write(s);
close()
}
})()
Instantly chuck any site URL into your favourite SEO tool. My go-to is SEMrush or Ahrefs. This is the most frequent button I find myself clicking day to day.
Script (source):
javascript:location.href='https://ahrefs.com/site-explorer/overview/v2/subdomains/recent?target='+encodeURIComponent(location.hostname + location.pathname)Semrush: https://www.semrush.com/info/
Majestic: https://majestic.com/reports/site-explorer?folder=&q=
Moz: https://analytics.moz.com/pro/link-explorer/overview?site=
Super effective for backlink analysis. Being able to see the quality of outlinks on a page at a glance is really useful for auditing. I’ve used this on multiple occasions to illustrate poor outlinking to colleagues and clients.
Script (source):
javascript: (function() {
var i, c, x, h;
for (i = 0; x = document.links[i]; ++i) {
h = x.getAttribute("href");
x.title += " " + x.innerHTML;
while (c = x.firstChild) x.removeChild(c);
x.appendChild(document.createTextNode(h));
}
})()
Check your schema markup against a competitor with this one click bookmarklet which instantly opens the page URL in google’s structured data tester.
Script (source):
javascript:location.href='https://search.google.com/structured-data/testing-tool/u/0/#url='+window.location
I know there are a ton of extensions that will do this for you but this is an instant dialogue box that will display useful meta content for the page URL.
Script (source):
javascript: (function() {
var url = document.location;
var meta = document.getElementsByTagName('meta');
var found = 'Not Found';
var title = document.title;
var output = '';
output = '\n\n##### Page Title #####\n\n' + title + '\n\n\n####META DATA####\n\n';
if (meta.length > 0) {}
for (i = 0; i < meta.length; i++) {
if (meta[i].getAttribute('name') != null) {
output += '\'' + meta[i].getAttribute('name') + '\'' + '\n' + meta[i].getAttribute('content') + '\n\n';
} else if (meta[i].getAttribute('property') != null) {
output += '\'' + meta[i].getAttribute('property') + '\'' + '\n' + meta[i].getAttribute('content') + '\n\n';
}
}
alert(output)
})();
Identify broken links instantly, no scrolling through, no inspect element, no screaming frog. Get a simple dialogue box with the broken image URL (I broke this one with inspect element to illustrate).
Script (source):
javascript: (function() % 7 Bvar ims % 3 Ddocument.images, brokenCount % 3 D0, brokenURLs % 3 D "", text, i % 3 B
for (i % 3 D0 % 3 Bi < ims.length % 3 B % 2 B % 2 Bi)
if (!(ims % 5 Bi % 5 D.naturalHeight % 7 C % 7 C ims % 5 Bi % 5 D.fileSize > 0)) % 7 B % 2 B % 2 BbrokenCount % 3 B brokenURLs % 2 B % 3 D "URL: " % 2 B ims % 5 Bi % 5 D.src % 2 B "%5Cn" % 3 B % 7 D % 3 B text % 3 D brokenCount % 2 B " broken image" % 2 B(brokenCount % 3 D % 3 D1 % 3 F "": "s") % 3 B
if (brokenCount) alert(text % 2 B ":%5Cn%5Cn" % 2 B brokenURLs) % 3 B
else alert("No broken images.") % 3 B % 7 D)()
SEO’s are expected to be problem solvers, negotiators, project managers, instigators, copywriters, web devs and many other things which can be challenging.
I strongly advise you to create a folder on your bookmark bar and stack as many script nuggets as you can to master complex tasks in a flash.
Happy scripting 💪