Comments (10)
+1
from prerender.
I'll look into this and let you know what I find. Thanks for letting me know!
from prerender.
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.
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.
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.
well that would be great. I will test it. Let me know when you have fixed that
from prerender.
Fixed on the github repo. It'll be pushed to production of prerender.io sometime later today.
from prerender.
@thoop Great thank you I will test it and give you feedback!
from prerender.
@thoop it works without modification now. Thank you. You can close this issue.
from prerender.
Thanks for letting me know!
from prerender.
Related Issues (20)
- Question: is `TIMEOUT_STATUS_CODE` a stable configuration variable
- Retrying connection to Chrome... HOT 2
- Restarting Chrome at almostly every request HOT 2
- Chrome died immediately after restart... stopping Prerender HOT 1
- Unable to fetch Useragent header on Prerender Server
- How to do this with static site?
- Error on running prerender locally HOT 4
- Not able to set default mobile user-agent in prerender
- Cacheing of SPA JS and CSS bundles HOT 1
- Timed out waiting for Chrome connection after Restarting Chrome HOT 16
- Prerender stopped working with ReactJS
- Sending of Custom Headers
- Update package version to include #748
- HTTP code returned 200, even if the page is a 404
- Is hosting prerender locally affects the pre-existed caching with prerender.io service? HOT 1
- Using PRERENDER_TOKEN
- Crawling does not work properly when using own deployment of prerender HOT 8
- Retrying Connection...undefined HOT 9
- doesnt work!!!!!! HOT 2
- blockResources not working? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prerender.