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

React based sample and AMP Validator #64

Closed
JosefJezek opened this issue Feb 3, 2017 · 4 comments
Closed

React based sample and AMP Validator #64

JosefJezek opened this issue Feb 3, 2017 · 4 comments

Comments

@JosefJezek
Copy link

AMP Validator don't see AMP content in React based sample.

https://chrome.google.com/webstore/detail/amp-validator/nmoffdblmcmgeicmolmhobpoocbbmknc

@sebastianbenz
Copy link
Collaborator

Yes - that's working as intended. The validator requires the root document to be AMPHTML.

@JosefJezek
Copy link
Author

@sebastianbenz Do Google Search see AMP content in Shadow DOM?

@andreban
Copy link
Member

andreban commented Feb 6, 2017

When the service-worker is not installed, the user will be served the AMP version of the page, which is correctly validated by the AMP validator:

screen shot 2017-02-06 at 9 39 27 am

Once the service worker is installed, the request is caught by it and the app-shell is served. The app-shell itself is not an AMP page. It fetches the correspondent AMP page and uses the amp-shadow element to render it inside the shell.

So, whenever a user-agent sees the page for the first time, the AMP version is served. The AMP version will also be served when the user-agent does not support service-workers.

@JosefJezek
Copy link
Author

@andreban Service Worker is awesome. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants