Skip to content

feature: SEO Optimization and Dynamic Metadata for Flet Web (WASM/CanvasKit) #5957

@Muddassir-Farooq-official

Description

Duplicate Check

Describe the requested feature

Currently, Flet Web apps are difficult to index for search engines. Because Flet renders via CanvasKit/Skia, the HTML source is often just a script tag. Furthermore, there is no built-in way to dynamically update the page title, meta descriptions, or Open Graph (OG) tags based on the current page.route. This prevents Flet from being used for public-facing production sites, blogs, or e-commerce frontends where SEO is mandatory.

Suggest a solution

Introduce a page.web_metadata object or similar API that allows developers to update SEO-related tags dynamically from Python.
​Key Features:
​Dynamic Title/Meta: Ability to set <title> and on route changes.
​Social Preview: Support for og:image and twitter:card tags so shared links look professional.
​Server-Side Rendering (SSR) Hints: A way to generate a "static" version of the control tree text so bots (Googlebot/Bing) can read the content without executing full WASM logic.

​Example Python API:
def on_route_change(e):
if page.route == "/product/123":
page.web_metadata.title = "Awesome Product - My Store"
page.web_metadata.description = "Buy this awesome product now!"
page.web_metadata.og_image = "https://mysite.com/prod.jpg"
page.update()

Screenshots

No response

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestSuggestion/Request for additional feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions