We’ve noticed that some old concerns have stuck around and kept the e-commerce world unsure about the implications of JS on SEO:
- "Pages are not indexed"
- "Javascript is slow"
Pages are not indexed
Historically, there were concerns that search engines only indexed the HTML source returned from the server, potentially missing content generated by JavaScript. However, search engines now incorporate JavaScript execution as part of their rendering process. This means that pages are fully loaded and indexed, including JavaScript-generated content.
For more insights into how Google manages JavaScript and SEO, consider reading the following resources:
- Javascript SEO basics and In-depth guide on indexing by Google, explaining how they approach indexing.
- Can Google Properly Crawl and Index JavaScript Frameworks? A JS SEO Experiment, an experiment that concludes that javascript indexing has some negative side-effects.
- How Google handles JavaScript throughout the indexing process, an extensive research project by MERJ (a big SEO consulatancy firm) and Vercel that determines that Google successfully indexes JavaScript but with some rendering delays.
- Rendering Queue: Google Needs 9X More Time To Crawl JS Than HTML, an experiment that concludes that Google successfully indexes JavaScript but with some rendering delays.
How we handle this
By default, Tweakwise JS uses the browser hash to store page state using a special syntax.
Navigating to the Clothing category of your shop (/clothing
), using Tweakwise JS the page would be rendered by Tweakwise JS. This rendered content will also get properly indexed, including facet contents.
After using a filter, sorting or paging, the URL would be updated. For example going to page 2 would update the URL to /clothing#twn|tn_p=2
. Crawlers (like Google) will only see the /clothing
part, so they will never be able to index any follow-up pages.
To solve this problem, we introduced a new option to save the state in the querystring. When using this option, going to page 2 would update the URL to /clothing?tn_p=2
. Crawlers will be able to see the tn_p=2
part so they will be able to index all follow-up pages.
This means that lister pages served by us are fully indexed
Javascript is slow
In recent years, Google has put more value on user experience (UX) and performance, making these aspects crucial for effective SEO strategies. Improving website performance leads to a smoother user experience, which can positively influence search rankings.
Some common concerns related to the Web Vitals that float around:
- LCP (Largest Contentful Paint):
On many e-commerce sites, the LCP element is often a product image within a tile. When JavaScript is used to render these elements after the initial page load, it can negatively impact the LCP score due to delayed rendering. - CLS (Cumulative Layout Shift):
Layout shifts can occur both on the initial page load and during client-side interactions like filtering. This is especially problematic on slower devices or lower-performing implementations. - INP (Interaction to Next Paint):
JavaScript-heavy pages can perform poorly on older or low-powered devices, resulting in higher INP values due to sluggish responsiveness and longer input delay times.
How we handle this
In many cases, Tweakwise JS already improves the performance of search and category pages by bypassing slower components of the underlying platform. On top of that, Tweakwise is actively developing to optimize Web Vitals metrics.