GithubHelp home page GithubHelp logo

liuwenchao / ajax-seo Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 5.0 7 KB

Use phantomjs to build a simple server to provide rendered html to crawlers, for ajax sites.

License: MIT License

JavaScript 100.00%

ajax-seo's Introduction

Hi there ๐Ÿ‘‹

trophy

ajax-seo's People

Contributors

liuwenchao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ajax-seo's Issues

Getting response: <html><head></head><body></body></html>

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.

Example does not work?

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!

setTimeout 10000 ?

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

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.