-
Notifications
You must be signed in to change notification settings - Fork 175
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
When creating a site using HB, I want it to be indexable by Google so that users can find it #1421
Comments
https://www.polymer-project.org/2.0/start/install-2-0#building-for-deployment (for information on required Polyfill Loader etc.) https://github.com/Polymer/polyserve/blob/master/src/compile-middleware.ts (Polyserve tranformation using babel for browsers needing ES5) |
A virtualbox image with Chrome 27 is available at Everything related to transpilation of ES6 features should also be testable using e.g. IE11 which is available from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/. |
Polymer 2 itself has big issues when running on such old Chrome. See this issue: Polymer/polymer#4495 ... but, we don't need to support that chrome version to be able to make the webpage crawlable. We can see that by running the Fetch and Render tool from Google: https://support.google.com/webmasters/answer/6066468?hl=en Even when using a pure Polymer 2 ES6 page, Googlebot fetches and parses it correctly. Now on IE11: to be able to run Polymer 2 on it, we need to compile the application to ES5, since it doesn't support ES6. We also need to import some polyfills - and to make evergreen browsers work with the compiled ES5, we need to include an adapter as well. Basically, just by compiling and importing the polyfills, IE11 works. There are some caveats though. For instance, IE11 can't handle To make HB work with IE11 out-of-the-box, there are some modifications that need to be made in the code, and we somehow have to deal with the compilation process as well. This is more suitable for another ticket. |
The actual changes related to IE11 support are covered by #1438. Apparently nothing else needs to be done. |
Chrome 27 is currently used by Googlebot for indexing pages. This means that for a HB app to be indexable, it would have to render useful content in Chrome 27.
This was previously handled by the prerendered output, but we would have to find a different solution for Polymer 2 templates that cannot be prerendered (without losing information).
The main problem is probably that Chrome 27 doesn't support ES 6 classes, which means that Polymer 2 itself as well as all
PolymerTemplate
templates and third party web components would have to be transpiled. When developing a regular Polymer 2 app, thepolyserve
tool takes care of transpiling files on the fly if using an old browser. There's also a Polymer-provided build script (probably Gulp) that does transpilation for production use.It's acceptable that Hummingbird doesn't do transpilation out-of-the-box, but we should still be able to describe what an application developer must do in order to support browsers without native ES6 class support (i.e. googlebot and IE 11).
The text was updated successfully, but these errors were encountered: