سؤال

Tried to install spiderable and phantomjs for SEO.

The first was that i added spiderable.

meteor add spiderable

Works fine. Installed. When i try to open a url with the GET parameter like http://localhost:3000/?_escaped_fragment_= there is a server error - phantomjs is missing.

So i added phantomjs smart package.

mrt add phantomjs

When I reopen my project url with the GET paramter there is no Server error and no client JS error. But the Source-code of this website is:

<!DOCTYPE html><html class=" js cssanimations csstransitions"><head>
  <link rel="stylesheet" href="/1c2c36f3a0bb39970171882896d7e916b597a938.css">



[A feeeeeew breaks! About 150 breaks - dunno why.]


<title>My title</title>
    </head></html>

So the website is just white. No content in it.

Tried a few parameter and also empty parameter.

For example: in iron-router i setuped the /jobs path. So i tried:

http://localhost:3000/?_escaped_fragment_=jobs

iron-router uses for jobs a plain HTML template. No helpers or smth else. Just to test the spiderable package.

No errors - not on client and not on server. Something missing ? Dunno whats wrong with my code. I also used this list: http://www.meteorpedia.com/read/spiderable

The troubleshooting ... all in this list is fine.

Info: I still installed phantomjs on my OS too!

 $ phantomjs -v // returns 1.9.7
هل كانت مفيدة؟

المحلول

The only thing I see missing is the lack of the <meta> tag. In the head of the document there should be

<meta name="fragment" content="!">

Look at Manuel Shoebel's blog it might help.

http://www.manuel-schoebel.com/blog/meteor-and-seo

نصائح أخرى

Try this:

mrt remove phantomjs
npm install -g phantomjs

The usual culprit is that spiderable may be waiting for some subscriptions to finish returning data, whereas those subscriptions actually aren't sending data at all. You'll need to look into the packages you are using in your project as well as your code to see what might be the culprit. Another reason may be that PhantomJS isn't able to connect to your server, which often happens if you are running behind a load-balancing reverse proxy.

How long does testing with ?_escaped_fragment take for the page to load? This will allow you to distinguish between the two situations.

For other possible causes, check out the following leads:

In my experience, one package that caused these errors was Observatory.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top