Javascript SEO Cape Town Guide

Grow with Us! Tell me more

Before you read our amazing content below ...

Free SEO analysis by a human in 24 hours, just enter your website address ...

Javascript SEO Cape Town Guide

SEO Nerd Technical SEO


JavaScript SEO Cape Town Guide


In this JavaScript SEO Cape Town Guide, you will learn everything you need to know to ensure that your site is crawlable, fast loading, and technically beneficial to your SEO in just 10 minutes of reading time. As an SEO company, we need to understand how Javascript is crawled and rendered, the actual mechanism, its limitations, and the bigger picture to help you have the best chance of ranking high.


What is JavaScript?


Before we delve into the SEO side of things, we first need to start this SEO Cape Town guide off by revealing what JavaScript is. JavaScript is most certainly the future of the web. Of course, you have CSS and HTML at the foundation. However, coding in JavaScript is something that is expected of every modern web developer and Javascript SEO is paramount.



Basically, JavaScript is a programming language, and it is one of the most popular ones. It is used by website developers in order to make websites interactive. You can dynamically update a page’s content with JavaScript. This means that content updates in real-time, without people needing to hit the refresh button. SEO needs to account for this processing.




So, to build a website, CSS and HTML are needed. However, to make an interactive and dynamic website – which is what websites need to be in 2020 – JavaScript is a must but must be used sparingly for the best SEO. That is why we decided to put together this JavaScript SEO Cape Town Guide.


The elements of a website that are frequently made by JavaScript


In order to get a better understanding of JavaScript, it is important to understand the types of content that tend to be generated by JavaScript. This is usually the following:


– Comments
– Reviews
– Top products
– Internal links
– Pagination



The relationship between Google and JavaScript


Now that you have a good idea regarding what JavaScript is and why it is so important, we need to take a look at the relationship JavaScript has with search engines such as Google.


Can Google Index JavaScript?


The answer is, it can, but it is never guaranteed. Based on research that has been collated, it seems that roughly every three in four websites using JavaScript are indexed. This means that a massive 25 percent are not!




What this tells us, though, is that Google does have the ability to index JavaScript content very well on some websites. Because of this, we can deduce that the problems with JavaScript and indexing on some websites is self-inflicted. The good news here is that it can be fixed.


SEO Cape Town – Understanding why search engines may have some difficulty with JavaScript


There are a number of reasons why search engines like Google can have troubles with JavaScript. This includes the following…


JavaScript crawling is complex


Everything is straightforward and easy when it comes to crawling traditional HTML sites. However, things get a bit more complicated when JavaScript is involved. This is the process…


– The Googlebot will download an HTML file.
– No links are found at the source code by the Google Bot, as they are only injected once JavaScript is executed.
– The Googlebots will then download the JS and CSS files.
– The Google Web Rendering Service has to be used by the Googlebot to parse, compile, and execute the JavaScript.
– The Google Web Rendering Service then fetches the data from the database, external APIs, and so on.
– The content can then be indexed by the indexer.
– Google can discover new links and add them to the crawling queue.



(Source: Google Webmasters: Javascript SEO S01E01)


This process is a lot more extensive when compared to crawling a traditional HTML site. There are then a number of different issues that can go wrong. For example, it is common that search engines are not able to discover any links on a page before the page has been rendered.


The Googlebot does not act in the same manner as a real browser


Another reason why indexing JavaScript websites is difficult and can pose some difficulties in terms of SEO Cape Town is that Googlebot is not a typical browser. It may be based on the current version of Google Chrome but this does not mean it is a typical Chrome user or browser.


What’s the difference? Well, browsers always download all resources. Googlebot may decide not to. Aside from this, Google won’t pick up content if it relies on stored data, like cookies. Moreover, Googlebot automatically declines all user permission requests. Because of this, Googlebot does not always load all resources, nor does it even visit all of the pages that it encounters. This can pause some complexities when it comes to SEO, and that’s why you need SEO Cape Town experts to help make sure your JavaScript is optimised correctly.


Javascript and SEO – Getting it right


Now that you have an understanding regarding the difficulties when it comes to JavaScript and SEO Cape Town, we are going to take a look at how you can get it right. You need to understand the foundations for successful JavaScript SEO. There are three important factors here. These are as follows.


1. Crawlability
2. Renderability
3. Crawl budget


Firstly, crawlability relates to how Google is able to crawl your site. You need to ensure your site has the correct structure and that Google can discover all of your valuable resources. Next, renderability means that Google should be able to render all of your site. Finally, your crawl budget refers to how much time it is going to take for the search engine to crawl and render your site.
Making your JavaScript content search engine-friendly




There are a number of different steps that you can take to make sure that your content is search-engine friendly on your JavaScript website.


Can Google technically render your site?


This is the first thing that you need to check. You need to make certain that the search engine is able to technically render your JavaScript content. It is not simply enough to open your browser and see if the website is ok. Rather, you need to use the URL Inspection Tool that Google offers. This is beneficial because it gives you the ability to see a screenshot of how a Googlebot would render the content that is JavaScript-based on your website.


When looking at the screenshot, there are a number of things you need to look out for. You need to make sure that the main content is visible first and foremost. You then need to be sure that Google can see the other crucial elements of your page and that Google can access areas like similar products and articles. You may also want to take a look at the HTML tab within the report that has been generated in order to delve a bit deeper.


Is your content indexed in Google?


Next, you need to make sure that your JavaScript content is actually indexed in Google. There are two ways that you can do this – one is quicker and one is more accurate. The quicker method is using the ‘site’ command.


The more accurate option is to check the Google Search Console. You may want to do the ‘site’ command method first, so you can get some quick information. However, accuracy is always best, and so we would still recommend going for the Google Search Console option.


To do this, you’re going to need to use the URL Inspection Tool again. Simply type the URL into this tool. You should then click on ‘view crawled page.’ This is going to display the code of the page that is indexed in Google. To make certain that the vital fragments of your content that have been generated by JavaScript are there, press Ctrl and F at the same time.


It is advisable to repeat this process for a random selection of URLs to see if Google has indexed your content correctly. Don’t merely stop after checking one page!


Presenting JavaScript content the right way


Knowing how to present JavaScript content in the correct manner – i.e. for both search engines and users – is critical. This is not just in the context of this JavaScript SEO Cape Town guide, but when it comes to SEO as a whole.


Client-side rendering and server-side rendering


There are two important concepts that need to be understood here. These are as follows: client-side rendering and server-side rendering. The latter is the more traditional approach. This is whereby a Googlebot or browser will receive an HTML file that describes the page in full. Typically, search engines will not have any problems with JavaScript content that has been server-side rendered.


However, client-side rendering is becoming more and more popular. It is a bit different, and sometimes search engines can have trouble with it. With this method, it is fairly common that a Googlebot or browser will receive a blank HTML page in the first load. However, the magic will then happen. The content copy will be asynchronously downloaded by JavaScript from the server, with your screen updating as a consequence.


There’s a really simple way of understanding the concept. With server-side rendering, it’s like Google receiving a cake, iced and ready to enjoy. With client side-rendering, it’s like Google getting the recipe and ingredients that are needed to make the cake.


There is a mixture of both approaches on the website today. We have seen a lot of websites implement server-side rendering when Google cannot index the JavaScript content. This is something that the likes of Expedia, Nike, and Netflix have all taken advantage of. However, there is one issue, and this is the fact that many developers find server-side rendering difficult to implement. This situation is improving all of the time, though.


Dynamic rendering


Another viable approach to consider is what is known as dynamic rendering. With this, a fully-featured JavaScript website will serve your users. However, at the same time, the Googlebot is going to receive a static version of your site. This is an approach that Google officially supports. There are a number of different tools that are available to help you with the implementation of dynamic rendering on your site, including Rendertron and Puppeteer.


Can social media websites deal with JavaScript?


Of course, we know that social media marketing is a massive part of search engine optimisation. Unfortunately, though, JavaScript is not processed by social media websites when their crawlers are crawling a site. This means that the likes of LinkedIn, Twitter, and Facebook do not run JavaScript.


As this is the case, it means that you need to include Facebook Open Graph markup and Twitter Cards in the initial HTML. If you don’t do this, your content is not going to be displayed properly whenever people share it on social media. This can seriously hurt your online marketing efforts, as social media users are going to be much less likely to click on the content that is shared from your website.


Common pitfalls with JavaScript websites


In the final part of this SEO Cape Town guide, we are going to take a look at some of the common pitfalls that you need to look out for when it comes to JavaScript websites and SEO.


Using hashtags in URLs


It is still common for a lot of sites that use JavaScript to generate URLs that include a hashtag. This is a problem because there is a real chance that these URLs are not going to be crawled by Googlebot.


Pagination implemented incorrectly


Pagination is a popular way of fragmenting a large quantity of content. However, it is common that these sites will only enable the Googlebot to visit the first page of the pagination. This is something you need to watch out for when developing your website.


Blocking CSS and JS files for Googlebot


Finally, as Googlebot has the ability to crawl and render the content made using JavaScript, there is no reason to block it from getting into any of the external or internal resources that are needed for rendering.


Final words on JavaScript SEO Cape Town


So there you have it: everything you need to know about JavaScript and SEO. We hope that you have found this JavaScript SEO Cape Town Guide useful and that it will help you when it comes to setting yourself apart online today. While JavaScript can present some complexities in terms of SEO, this does not mean that mastering SEO is not possible.