Skip to content

alopezvillaverde/javascript-crawlable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

javascript-crawlable

There is a known problem regarding to JavaScript and search engine crawlers. Search engines as Google don't read JavaScript code. So if you want to use a MVC JavaScript framework such as BackboneJS or AngularJS for your developments, you have a problem. Your data is hidden in templates so this isn't good for SEO. The solution stops by PhantomJS with a little bit of coding.

How it works

The first thing we have to do is configure our .htaccess apache configuration file properly. All the non-existent requests will be redirected to our phantom.php file with the url itself as a parameter.

Setting a number of tries we execute PhantomJS via shell with a timeout to render our JavaScript code as HTML code. In addition, we use a tiny system cache for getting better performance results.

About

Solving the JavaScript SEO problem through PhantomJS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published