SlideShare a Scribd company logo
SEO methods in SinglePage Applications
Or how to make your app
Google bot friendly
Вячеслав Потравный
Vyatcheslav Potravnyy

Front-End Team Lead at
http://bit.ly/seo-js
What is a problem?
How SPA works for user?
1. User opens http://blog.ru/index.html#/articles/1
2. Emtpy index.html loading with links on JS
3. User loads an App (all JavaScript code)
4. Router starting - here we know about #/articles/1
5. Models starting and downloads JSON’s
6. Views starting and renders templates
7. PROFIT! User see the content
How SPA works for Google bot?
1. Bot opens http://blog.ru/index.html#/articles/1
2. Emtpy index.html loading with links on JS
What is the solution?
What does Google advice?
1. Bot see URL .../index.html#!/articles/1
2. Bot knows it’s AJAX site, and does not use this URL.
It uses .../index.html?_escaped_fragment_=/articles/1
3. We handle this on server, and send rendered HTML
4. Bot associates this page with original URL
5. PROFFIT!
But if we have no hashbang?
1. Bot downloads page .../index.html
2. Bot sees <meta name="fragment" content="!">
3. Bot downloads .../index.html?_escaped_fragment_=
4. Server rendering
How to render App?
1. Write all on server framework
As webapps used to be written years ago.
2. Write content parts on server
framework (like Twitter)
+ Native solution

- Rewrite a lot

+ User gets content fast

- Duplicate code
- Complexity grows
- Only main content indexed
- No longer a frontend app
3. Run in browser and save HTML
+ Not a lot of work
+ Architecture independed
+ Bot gets the same page

- Slow and hard for server
Manually?! No. Headless browser
❏ HtmlUnit
❏ crawljax
❏ watij
❏ Phantom JS
How does this work?
1. Bot request .../index.html?_escaped_fragment_=/page
2. We filter this request to another route
3. We run headless browser with original URL
4. Let all requests be finished
5. Get final HTML from headless browser
6. Remove <scripts> from HTML
7. Response to Google bot
8. PROFIT!
SEO methods in Single Page Applications
SEO methods in Single Page Applications
What can be improved?
1. Rendering delay
a. Make on CRON and save on disk
b. Cache with nginx or Varnish
2. Loading detection
a. Wait for all requests
b. Flag on body
c. App event, handled on Node.js side
What about future?
Full-stack
(aka Isomorphic)
Benefits
1. Both server & client written in one language - JS
2. You can reuse generic code on server & clients
3. Server-side rendering for SEO & performance?
4. Simply create two-way API’s
Derby.js
1. SEO from the box
2. Huge localization abilities
3. Device adaptiveness abilities
4. Production-ready
5. Based on YUI
1. Almost Backbone
2. Very light and flexible
3. SEO from the box
4. Its framework, not a plug-in library
5. Too simple for huge apps
Meteor.js
1. Access to data from everywhere
2. 2-way API with Latency Compensation
3. Simple dive-in
4. Biggest community
5. Own packages instead of NPM
6. SEO through phantom.js
Atma.js
1. SEO from the box
2. Component ideology
3. Complex solution - lot of tools
4. No community yet
5. No documentation yet
Derby.js
1. SEO from the box
2. User gets HTML at very start
3. 2-way API and Realtime Collaboration
4. Most “smart”
5. Built on other open-source components
6. Hard to dive-in
7. Deps Redis & MongoDB
Questions?
Sources:
Google Specification
Backbone Tutorials
The Digital Self
Year of Moo
Derby.js

Vyatcheslav Potravnyy
Happy New Front-end!
by Geeks Lab

(January 18, 2014)

More Related Content

PPTX
Micro frontends
PPTX
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...
PPTX
[DevDay2019] Micro Frontends Architecture - By Thang Pham, Senior Software En...
PPTX
PPTX
Sony lazuardi native mobile app with javascript
PPTX
Web development tool
PPTX
New Era of Plugin Development in WordPress
PPTX
Weekly Session with the local .NET Developer Community
Micro frontends
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...
[DevDay2019] Micro Frontends Architecture - By Thang Pham, Senior Software En...
Sony lazuardi native mobile app with javascript
Web development tool
New Era of Plugin Development in WordPress
Weekly Session with the local .NET Developer Community

What's hot (20)

PDF
What is FED
PDF
You should Know, What are the Common mistakes a node js developer makes?
PPTX
List of Tools for WordPress Developers
KEY
Mobile Web Apps: State of the Tools
PDF
Angular js - 10 reasons to choose angularjs
PPTX
Organisation of professional JavaScript Projects
PDF
Less & RequireJS - Frontend Development in Magento 2
PPTX
University Hackathon Kit
PDF
Joomla! future #jd14fr keynote
PPT
Agile Software Development by Sencha
PPTX
Full stack web development
PPTX
Refactoring code in .net
PPTX
How to build your own Hybrid JS Interface with Android?
PDF
Top Web Development Frameworks Comparison: All You Need To Know
PDF
Building native mobile Apps with ReactNative
PPTX
Selenium_For_Beginners_VodQA_Final
PDF
Introducing Selenium Builder – the Future of Test Development
PDF
Manuele Menozzi - Gestione delle dipendenze con Composer in Magento 2
PPTX
Java script
What is FED
You should Know, What are the Common mistakes a node js developer makes?
List of Tools for WordPress Developers
Mobile Web Apps: State of the Tools
Angular js - 10 reasons to choose angularjs
Organisation of professional JavaScript Projects
Less & RequireJS - Frontend Development in Magento 2
University Hackathon Kit
Joomla! future #jd14fr keynote
Agile Software Development by Sencha
Full stack web development
Refactoring code in .net
How to build your own Hybrid JS Interface with Android?
Top Web Development Frameworks Comparison: All You Need To Know
Building native mobile Apps with ReactNative
Selenium_For_Beginners_VodQA_Final
Introducing Selenium Builder – the Future of Test Development
Manuele Menozzi - Gestione delle dipendenze con Composer in Magento 2
Java script
Ad

Similar to SEO methods in Single Page Applications (20)

PPTX
Using AppEngine for Mobile Apps
PDF
Max Voloshin - "Organization of frontend development for products with micros...
PDF
Universal apps lightning talk
PDF
JSFest 2019: Technology agnostic microservices at SPA frontend
PDF
Testing with Codeception
PPTX
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
PPTX
Reactive application using meteor
PPTX
BlackBerry 10 Browser
PPTX
Gwt ppt
PDF
iOS 14 Programming Fundamentals with Swift Covers iOS 14 Xcode 12 and Swift 5...
PPTX
Spring security mvc-1
PDF
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
PPTX
Webinar on How to use MyAppConverter
PPT
Proper Connections Development for Proper Domino Developers
PPTX
Stanislav Khorunzhyi, "Front-end it like a PRO"
PDF
PPT
Application depolyment
PDF
Seven Versions of One Web Application
DOC
PDF
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Using AppEngine for Mobile Apps
Max Voloshin - "Organization of frontend development for products with micros...
Universal apps lightning talk
JSFest 2019: Technology agnostic microservices at SPA frontend
Testing with Codeception
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
Reactive application using meteor
BlackBerry 10 Browser
Gwt ppt
iOS 14 Programming Fundamentals with Swift Covers iOS 14 Xcode 12 and Swift 5...
Spring security mvc-1
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Webinar on How to use MyAppConverter
Proper Connections Development for Proper Domino Developers
Stanislav Khorunzhyi, "Front-end it like a PRO"
Application depolyment
Seven Versions of One Web Application
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Ad

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
A Presentation on Artificial Intelligence
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Tartificialntelligence_presentation.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Getting Started with Data Integration: FME Form 101
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
Teaching material agriculture food technology
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Network Security Unit 5.pdf for BCA BBA.
gpt5_lecture_notes_comprehensive_20250812015547.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Group 1 Presentation -Planning and Decision Making .pptx
A Presentation on Artificial Intelligence
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Tartificialntelligence_presentation.pptx
Empathic Computing: Creating Shared Understanding
Building Integrated photovoltaic BIPV_UPV.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
cloud_computing_Infrastucture_as_cloud_p
Getting Started with Data Integration: FME Form 101
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Teaching material agriculture food technology
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf

SEO methods in Single Page Applications

  • 1. SEO methods in SinglePage Applications Or how to make your app Google bot friendly
  • 4. What is a problem?
  • 5. How SPA works for user? 1. User opens http://blog.ru/index.html#/articles/1 2. Emtpy index.html loading with links on JS 3. User loads an App (all JavaScript code) 4. Router starting - here we know about #/articles/1 5. Models starting and downloads JSON’s 6. Views starting and renders templates 7. PROFIT! User see the content
  • 6. How SPA works for Google bot? 1. Bot opens http://blog.ru/index.html#/articles/1 2. Emtpy index.html loading with links on JS
  • 7. What is the solution?
  • 8. What does Google advice? 1. Bot see URL .../index.html#!/articles/1 2. Bot knows it’s AJAX site, and does not use this URL. It uses .../index.html?_escaped_fragment_=/articles/1 3. We handle this on server, and send rendered HTML 4. Bot associates this page with original URL 5. PROFFIT!
  • 9. But if we have no hashbang? 1. Bot downloads page .../index.html 2. Bot sees <meta name="fragment" content="!"> 3. Bot downloads .../index.html?_escaped_fragment_= 4. Server rendering
  • 11. 1. Write all on server framework As webapps used to be written years ago.
  • 12. 2. Write content parts on server framework (like Twitter) + Native solution - Rewrite a lot + User gets content fast - Duplicate code - Complexity grows - Only main content indexed - No longer a frontend app
  • 13. 3. Run in browser and save HTML + Not a lot of work + Architecture independed + Bot gets the same page - Slow and hard for server
  • 14. Manually?! No. Headless browser ❏ HtmlUnit ❏ crawljax ❏ watij ❏ Phantom JS
  • 15. How does this work? 1. Bot request .../index.html?_escaped_fragment_=/page 2. We filter this request to another route 3. We run headless browser with original URL 4. Let all requests be finished 5. Get final HTML from headless browser 6. Remove <scripts> from HTML 7. Response to Google bot 8. PROFIT!
  • 18. What can be improved? 1. Rendering delay a. Make on CRON and save on disk b. Cache with nginx or Varnish 2. Loading detection a. Wait for all requests b. Flag on body c. App event, handled on Node.js side
  • 20. Benefits 1. Both server & client written in one language - JS 2. You can reuse generic code on server & clients 3. Server-side rendering for SEO & performance? 4. Simply create two-way API’s
  • 22. 1. SEO from the box 2. Huge localization abilities 3. Device adaptiveness abilities 4. Production-ready 5. Based on YUI
  • 23. 1. Almost Backbone 2. Very light and flexible 3. SEO from the box 4. Its framework, not a plug-in library 5. Too simple for huge apps
  • 24. Meteor.js 1. Access to data from everywhere 2. 2-way API with Latency Compensation 3. Simple dive-in 4. Biggest community 5. Own packages instead of NPM 6. SEO through phantom.js
  • 25. Atma.js 1. SEO from the box 2. Component ideology 3. Complex solution - lot of tools 4. No community yet 5. No documentation yet
  • 26. Derby.js 1. SEO from the box 2. User gets HTML at very start 3. 2-way API and Realtime Collaboration 4. Most “smart” 5. Built on other open-source components 6. Hard to dive-in 7. Deps Redis & MongoDB
  • 27. Questions? Sources: Google Specification Backbone Tutorials The Digital Self Year of Moo Derby.js Vyatcheslav Potravnyy Happy New Front-end! by Geeks Lab (January 18, 2014)