Coder Social home page Coder Social logo

GWT page is not rendered about prerender HOT 10 CLOSED

prerender avatar prerender commented on June 15, 2024
GWT page is not rendered

from prerender.

Comments (10)

steffimueller avatar steffimueller commented on June 15, 2024

+1

from prerender.

thoop avatar thoop commented on June 15, 2024

I'll look into this and let you know what I find. Thanks for letting me know!

from prerender.

thoop avatar thoop commented on June 15, 2024

It looks like this is a problem with GWT: https://groups.google.com/forum/#!topic/phantomjs/GwO02VsUHeQ

Basically, GWT checks the current user agent against the user agents that your application supports. Since our Prerender server has a custom user agent, GWT doesn't render anything. According to that article: "When compiling GWT you can specify which browsers and which versions your application will support". I haven't used GWT, so I can't tell you how.

The User Agent that Prerender uses is:
Prerender (+https://github.com/prerender/prerender)

I was able to verify the issue by changing the user agent of my local Prerender server to the same User Agent that my Chrome browser is currently using. That rendered the page correctly when I navigated to http://localhost:1337/http://gwtp-carstore.appspot.com

Please reopen this issue if you are unable to get it working after you compile GWT correctly with the Prerender user agent.

Thanks!

from prerender.

confile avatar confile commented on June 15, 2024

It is not possible to use the Prerender user-agent for GWT because GWT has a fixed set of user agents that you have to use. What you can do is changing the user agent of prerender to

page.set('settings.userAgent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko)');

Do you see any other solution to fix that?

from prerender.

thoop avatar thoop commented on June 15, 2024

I'll change it to the actual user agent of phantomjs and add the Prerender user agent on the end. Your GWT page seems to work in that case.

It'll look like this:

Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.7 Safari/534.34 Prerender (+https://github.com/prerender/prerender)

from prerender.

confile avatar confile commented on June 15, 2024

well that would be great. I will test it. Let me know when you have fixed that

from prerender.

thoop avatar thoop commented on June 15, 2024

Fixed on the github repo. It'll be pushed to production of prerender.io sometime later today.

from prerender.

confile avatar confile commented on June 15, 2024

@thoop Great thank you I will test it and give you feedback!

from prerender.

confile avatar confile commented on June 15, 2024

@thoop it works without modification now. Thank you. You can close this issue.

from prerender.

thoop avatar thoop commented on June 15, 2024

Thanks for letting me know!

from prerender.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.