SEO4Ajax middleware for Django
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


SEO4Ajax is a service that let you get full visibility on search engines, social networks and display advertising of any AJAX website based on Angular, React, Backbone, Ember, jQuery etc.

django-s4a is a middleware for Django. It provides an easy way to proxify GET requests from non-js clients (e.g. crawlers) to SEO4Ajax.


Copy the file in your project root.

Add the middleware in the MIDDLEWARE list in, e.g.


Set the S4A_TOKEN environment variable with the SEO4Ajax token of your site.

How it works

This middleware checks the presence of the _escaped_fragment_ query parameter or the presence of a user-agent string identifying bots that do not support the Ajax Crawling Specification. If the _escaped_fragment_ is present or a bot is detected, it requests the snapshot on SEO4Ajax and responds to the initial request with the concerned snapshot.