Skip to content

vikhyat/indexable

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 

Indexable

Drop-in Rack middleware that that executes javascript before serving pages to crawlers.

Installation

You will need to install PhantomJS. We use the network request abort functionality that was added in version 1.9, so lower versions will not work. You can check the installed version of PhantomJS by running phantomjs -v.

Rails

Add this to your Gemfile:

gem 'indexable'

That's it, we're done!

Rack

require 'indexable'
use Indexable::Middleware

There is an example Rack application in the example/ directory.

Common

(Optional) Adding the following meta tag to the head section of your pages will opt you into the AJAX crawling scheme, which the middleware uses in addition to checking the user agent in order to determine whether a request is coming from a crawler.

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

About

Rack middleware that executes javascript before serving pages to crawlers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published