# How do you approach JavaScript-generated metadata?

> Important metadata includes:

- title;

- description;

- canonical;

- robots;

- structured data.

Where practical, put critical metadata in the initial HTML.

If JavaScript generates it, test the rendered result and ensure there is no conflicting initial value.

Google's JavaScript documentation specifically discusses dynamically setting title, description, canonical and robots metadata.

## Sources

- [Google Search Central — Javascript SEO Basics](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics)

## Related questions

- [Can JavaScript generate structured data?](https://www.theseocentral.com/technical-seo-faq/can-javascript-generate-structured-data.md)
- [How do you handle pagination on large sites?](https://www.theseocentral.com/technical-seo-faq/how-do-you-handle-pagination-on-large-sites.md)
- [How does hreflang work?](https://www.theseocentral.com/technical-seo-faq/how-does-hreflang-work.md)
- [How does structured data fit into Technical SEO?](https://www.theseocentral.com/technical-seo-faq/how-does-structured-data-fit-into-technical-seo.md)
- [How should infinite scroll be implemented for SEO?](https://www.theseocentral.com/technical-seo-faq/how-should-infinite-scroll-be-implemented-for-seo.md)
- [How should you structure international websites?](https://www.theseocentral.com/technical-seo-faq/how-should-you-structure-international-websites.md)
- [How would you audit structured data at scale?](https://www.theseocentral.com/technical-seo-faq/how-would-you-audit-structured-data-at-scale.md)
- [What are common hreflang implementation failures?](https://www.theseocentral.com/technical-seo-faq/what-are-common-hreflang-implementation-failures.md)
- [What is the difference between structured data eligibility and ranking?](https://www.theseocentral.com/technical-seo-faq/what-is-the-difference-between-structured-data-eligibility-and-ranking.md)

---

Answered by Abhinav Krishna (https://www.theseocentral.com/author/abhinav-krishna)
Source: https://www.theseocentral.com/technical-seo-faq/how-do-you-approach-javascript-generated-metadata
