I am trying to use ajax-seo for an Angularjs app to serve html piled content from a PhantomJS webserver`. But it's not rendering the plete page. It's just giving the following response
<html><head></head><body></body></html>
I have followed the instructions well but no luck so far. So I'd like to know whether PhantomJS supports ES6 or not, because my app is in ES6.
I am trying to use ajax-seo for an Angularjs app to serve html piled content from a PhantomJS webserver`. But it's not rendering the plete page. It's just giving the following response
<html><head></head><body></body></html>
I have followed the instructions well but no luck so far. So I'd like to know whether PhantomJS supports ES6 or not, because my app is in ES6.
Share Improve this question edited Jun 4, 2016 at 14:27 Artjom B. 62k26 gold badges135 silver badges230 bronze badges asked Jun 4, 2016 at 11:40 drishti ahujadrishti ahuja 1,3992 gold badges15 silver badges27 bronze badges 4-
Which PhantomJS version do you use? Please register to the
onConsoleMessage
,onError
,onResourceError
,onResourceTimeout
events (Example). Maybe there are errors. – Artjom B. Commented Jun 4, 2016 at 13:03 -
@ArtjomB. I am using phantomjs version
1.9.0
. Am using the script from github./liuwenchao/ajax-seo/blob/master/seo.js – drishti ahuja Commented Jun 4, 2016 at 13:35 -
@ArtjomB. Even after adding
onConsoleMessage
,onError
and other methods specified by you, not getting any error. Simply getting the output as before – drishti ahuja Commented Jun 4, 2016 at 13:39 - check out github./segmentio/nightmare – Mulan Commented Jun 5, 2016 at 5:13
1 Answer
Reset to default 7PhantomJS 2.1.1 only supports about 10% of ECMAScript 6, which might not be enough to properly render your page.
Here is a slightly more detailed result based on https://kangax.github.io/pat-table/es6/:
Overall coverage: 10% > Array is subclassable: 0/11 > Array static methods: 0/11 > Array.prototype methods: 0/10 > Date.prototype[Symbol.toPrimitive]: No > Function is subclassable: 0/6 > HTML-style ments: Yes > Map: 0/19 > Math methods: 1/17 > Number properties: 0/7 > Object static methods: 0/4 > Object static methods accept primitives: 0/10 > Object.prototype.__proto__: 6/6 > Promise: 0/8 > Promise is subclassable: 0/4 > Proxy: 0/34 > Proxy, internal 'defineProperty' calls: 0/2 > Proxy, internal 'deleteProperty' calls: 0/6 > Proxy, internal 'get' calls: 0/36 > Proxy, internal 'getOwnPropertyDescriptor' calls: 0/4 > Proxy, internal 'ownKeys' calls: 0/3 > Proxy, internal 'set' calls: 0/11 > Reflect: 0/20 > RegExp "y" and "u" flags: 0/5 > RegExp is subclassable: 0/4 > RegExp syntax extensions: 8/8 > RegExp.prototype properties: 0/6 > RegExp.prototype.pile: Yes > Set: 0/19 > String static methods: 0/2 > String.prototype HTML methods: 3/3 > String.prototype methods: 0/10 > Symbol: 0/11 > Unicode code point escapes: 0/2 > WeakMap: 0/12 > WeakSet: 0/11 > __proto__ in object literals: 1/5 > arrow functions: 0/13 > block-level function declaration: No > class: 0/24 > const: 1/16 > default function parameters: 0/7 > destructuring, assignment: 0/24 > destructuring, declarations: 0/22 > destructuring, parameters: 0/23 > for..of loops: 0/9 > function "name" property: 3/17 > generators: 0/27 > let: 0/12 > miscellaneous: 2/10 > miscellaneous subclassables: 0/6 > new.target: 0/2 > non-strict function semantics: 2/3 > object literal extensions: 0/6 > octal and binary literals: 0/4 > own property order: 4/7 > proper tail calls (tail call optimisation): 0/2 > prototype of bound functions: 0/5 > rest parameters: 0/5 > spread (...) operator: 0/15 > super: 0/8 > template literals: 0/5 > typed arrays: 19/46 > well-known symbols: 0/26
This Gist contains the full data as well as the script that generated it.