2

I have an SPA application, and it is not being rendered correctly by Google. I tried going to Google Web Master toolkit, and use the Fetch as google feature. This is showing just the HTML output from the server, and the bindings etc of AngularJS are not rendering. The status is marked as Complete, and download time is 0.074 seconds. Application takes longer than that to execute, so I'm assuming Javascript is not being executed.

My assumptions are two:

  • Either Google is not executing javascript for some reason
  • Javascript error(s) are not allowing the page to correctly execute

The website works fine if I enter with a normal browser. Is it possible to view the console.log output somehow of the Fetch as Google request? Maybe there is some console error which is stopping the page from executing? Do you need to let google know that it is an SPA somehow?

5
  • in fetch as google there are option to choose the bot type. I hope you had chosen "Desktop" version. Commented Feb 3, 2016 at 15:06
  • Yes, I did choose Desktop version. I dont' think it makes a difference though Commented Feb 3, 2016 at 15:11
  • did you try fetch as google and render ? if Yes, did you see the errors it shows for the page content and libraries google is not able to fetch. For example: for most of map based pages , it throws error that google is not able to fetch maps js libraries. Commented Feb 3, 2016 at 15:17
  • Yes I did try. It shows the splash page , which is bad cause that should be removed by AngularJS. It seems that AngularJS isn't running. There are no libraries which it couldn't fetch. But then again, I cannot see any console errors if something went wrong! Commented Feb 3, 2016 at 15:22
  • 1
    I've got this problem too. Will investigate and post here if I find a solution.
    – jazmit
    Commented Feb 25, 2016 at 23:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.