Quick SEO Check with a Bookmark and JavaScript Code

Quick SEO Check via BookmarkI have created a extremely easy to use search engine optimization check on any web page. It is a simple one click bookmark, no plugins, no addons, no apps; it is just a bookmark. This bookmark works in all browsers including: FireFox, Internet Explorer, Safari, Chrome, and Opera. I use this bookmark tool all of the time when doing quick reviews and assessments of on page SEO. I have decided to give this to you the public for free. This bookmark has saved me time and the stress of going through HTML code looking for SEO related content.

What does the SEO Check bookmark / favorite link do?

The SEO bookmark script checks:

  • The page title, and page title length versus an optimal title length of 55 characters
  • The meta description and meta description length versus an optimal title length of 155 characters
  • The meta keywords, it lists all of the keywords used on the website. I know meta keywords are deprecated, but as you can see a lot of websites still use them.
  • Heading Tags / Headlines, the check counts the number of H1, H2, H3, and H4 tags used on the page
  • Counts the number of images compared to the number of alt texts declared and returns a number of missing image ALT attributes
  • Checks if Google Analytics is installed on the web page and returns the Property ID

How to install the SEO check bookmark

  1. Add any page as a favorite / bookmark.
  2. Edit that bookmark / favorite and rename it: “SEO Check” or whatever you want to call it.
  3. Delete the URL for the bookmark and replace it with this code:
javascript: var title = document.title; var pageContent = document.documentElement.innerHTML; pageContent = pageContent.toString().toLowerCase(); var titleLength = 0; var descLength = 0; var keyCount = 0; var metaDesc = document.querySelector("meta[name=\'description\']"); var metaKey = document.querySelector("meta[name=\'keywords\']"); var countH1 = 0; var countH2 = 0; var countH3 = 0; var countH4 = 0; var countImg = 0; var countAlt = 0; var countMissAlt = 0;  if((pageContent.indexOf("ua-") !== -1)&&(pageContent.indexOf("google-analytics") !== -1)){var analytics = String(pageContent.match(/ua-(?!c)[^'|"]*/gi)); if(analytics !== 'null'){analytics = "Property ID: "+ analytics.replace('ua','UA');}else{analytics='Missing';}}else{var analytics='Missing';} if(pageContent.match(/<img\s/gi)){countImg = pageContent.match(/<img\s/gi).length;} if(pageContent.match(/\salt=/gi)){countAlt = pageContent.match(/\salt=/gi).length;} if(pageContent.match(/<h1/gi)){countH1 = pageContent.match(/<h1/gi).length;} if(pageContent.match(/<h1/gi)){countH1 = pageContent.match(/<h1/gi).length;} if(pageContent.match(/<h2/gi)){countH2 = pageContent.match(/<h2/gi).length;} if(pageContent.match(/<h3/gi)){countH3 = pageContent.match(/<h3/gi).length;} if(pageContent.match(/<h4/gi)){countH4 = pageContent.match(/<h4/gi).length;} if(metaDesc){metaDesc = metaDesc.getAttribute("content"); descLength = metaDesc.length;} if(metaKey){metaKey = metaKey.getAttribute("content"); keyCount = metaKey.split(",").length;} if(title){titleLength = title.length;countMissAlt = Math.max((countImg - countAlt),0);analytics = analytics + "\n\npowered by riseofweb.com";} alert("SEO Check\n\nTitle ("+titleLength+" / 55 characters):\n"+title + "\n\nDescription ("+descLength+" / 155 characters):\n"+metaDesc+ "\n\n"+ keyCount +" Keywords (unimportant):\n"+metaKey+ "\n\nHeadlines:\nH1="+countH1+" H2="+countH2+" H3="+countH3+" H4="+countH4+"\n\n"+countImg+" Images:\n"+countMissAlt+" Images missing alt attributes\n\nGoogle Analytics Installed?\n"+analytics);

Copy all of this code and paste it into the URL for your new bookmark

How to use the SEO check bookmark

  • Now to use the bookmark, navigate to any webpage or website, and then click on the bookmark.
  • Now sit back and enjoy the SEO check’s output.

I have made this bookmark tool to save me time, now it can save you time as well. Enjoy!

Other Great SEO Bookmarklets: