liuwenchao / ajax-seo Goto Github PK
View Code? Open in Web Editor NEWUse phantomjs to build a simple server to provide rendered html to crawlers, for ajax sites.
License: MIT License
Use phantomjs to build a simple server to provide rendered html to crawlers, for ajax sites.
License: MIT License
Hello, Your solution looks damn good to solve SEO problem. I am trying to implement it to serve the angular app but getting the following response
<html><head></head><body></body></html>
The seo.js
file is placed along with the index.html
. The following curl command is used to get the html content.
curl localhost:8888/?_escaped_fragment_=/index.html
I have edited the index.html
file for the meta tag
. Did everything as you explained but not getting the actual response.
I made everything from the readme file , but when i try to access www.mywebsite.com/?_escaped_fragment_= it take some time and then i get a 504 gateway time-out
First up, thanks for this! It gives me a much better idea of the right way to use phantomjs
First issue I encountered is the example command $ curl http://localhost:8888/page#!/id/12 --header Host:localhost:3000
- the !
is interperted by bash as part of history
- this is fixed by running $ curl http://localhost:8888/page#\!/id/12 --header Host:localhost:3000
- note \!
after that - it still seems not to work, but has given me enough pointers, I should be able to fix it up for my situation!
Hi @liuwenchao and thanks for your nice job,
I feel curious about the setTimeout 10000.
page.onInitialized = function() {
page.evaluate(function() {
setTimeout(function() {
window.callPhantom();
}, 10000);
});
};
is-it for testing purpose ?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.