Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change external script from links to injection #146

mmocny opened this issue Aug 16, 2019 · 0 comments


Copy link

commented Aug 16, 2019

According to html spec, <script src=> is only supported for non-data (i.e. "type=application/json" is not supported). We should remove this from artifacts-loader and demo examples.

Additionally, while <link rel href> is a valid way to link to structured data, no known popular search indexers actually support this.

Instead, it's usually supported to dynamically inject Structured Data into the page using JavaScript.

Unfortunately, this is not possible for artifact-loader to implement, as we do not support dynamic page evaluation at index time.


  • Use a Custom Artifact Store which handles fetching index
  • For root page only: just delay initializing Perception Toolkit until the local DOM is updated
  • For leaf pages: Could implement a convention (declarative syntax) that still evaluates script dynamically for search crawlers, but which Perception Toolkit understands merely by scanning HTML text. E.g. via a custom element, or a custom attribute on script tag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.