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

When creating a site using HB, I want it to be indexable by Google so that users can find it #1421

Closed
Legioth opened this issue Mar 31, 2017 · 4 comments
Assignees
Milestone

Comments

@Legioth
Copy link
Member

Legioth commented Mar 31, 2017

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, the polyserve 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).

@Legioth Legioth added backlog and removed backlog labels Mar 31, 2017
@caalador
Copy link
Contributor

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)

@Legioth
Copy link
Member Author

Legioth commented Mar 31, 2017

A virtualbox image with Chrome 27 is available at smb://samba.intra.itmill.com/store/Virtual Machine images/Chrome 27 (accessible only inside the company network, so use a network cable, mllwln or VPN). Passwords are vaadin/vaadin and root/vaadin.

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/.

@gilberto-torrezan
Copy link
Contributor

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 <dom-repeat> inside <table> (see Polymer/polymer#1567). There are some issues related to memory leaks as well. But considering the scope of Hummingbird and what we can do about the bugs, I'd say we are safe in regards to IE11. Of course we always need to test any new features or code changes on IE11 for now on before releasing them.

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.

@Legioth
Copy link
Member Author

Legioth commented Apr 5, 2017

The actual changes related to IE11 support are covered by #1438. Apparently nothing else needs to be done.

@Legioth Legioth closed this as completed Apr 5, 2017
@Legioth Legioth added this to the Abandoned milestone Apr 5, 2017
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