SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
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!
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)

Contenu connexe

Plus de GeeksLab Odessa

DataScienceLab2017_Блиц-доклад
DataScienceLab2017_Блиц-докладDataScienceLab2017_Блиц-доклад
DataScienceLab2017_Блиц-докладGeeksLab Odessa
 
DataScienceLab2017_Cервинг моделей, построенных на больших данных с помощью A...
DataScienceLab2017_Cервинг моделей, построенных на больших данных с помощью A...DataScienceLab2017_Cервинг моделей, построенных на больших данных с помощью A...
DataScienceLab2017_Cервинг моделей, построенных на больших данных с помощью A...GeeksLab Odessa
 
DataScienceLab2017_BioVec: Word2Vec в задачах анализа геномных данных и биоин...
DataScienceLab2017_BioVec: Word2Vec в задачах анализа геномных данных и биоин...DataScienceLab2017_BioVec: Word2Vec в задачах анализа геномных данных и биоин...
DataScienceLab2017_BioVec: Word2Vec в задачах анализа геномных данных и биоин...GeeksLab Odessa
 
DataScienceLab2017_Data Sciences и Big Data в Телекоме_Александр Саенко
DataScienceLab2017_Data Sciences и Big Data в Телекоме_Александр Саенко DataScienceLab2017_Data Sciences и Big Data в Телекоме_Александр Саенко
DataScienceLab2017_Data Sciences и Big Data в Телекоме_Александр Саенко GeeksLab Odessa
 
DataScienceLab2017_Высокопроизводительные вычислительные возможности для сист...
DataScienceLab2017_Высокопроизводительные вычислительные возможности для сист...DataScienceLab2017_Высокопроизводительные вычислительные возможности для сист...
DataScienceLab2017_Высокопроизводительные вычислительные возможности для сист...GeeksLab Odessa
 
DataScience Lab 2017_Мониторинг модных трендов с помощью глубокого обучения и...
DataScience Lab 2017_Мониторинг модных трендов с помощью глубокого обучения и...DataScience Lab 2017_Мониторинг модных трендов с помощью глубокого обучения и...
DataScience Lab 2017_Мониторинг модных трендов с помощью глубокого обучения и...GeeksLab Odessa
 
DataScience Lab 2017_Кто здесь? Автоматическая разметка спикеров на телефонны...
DataScience Lab 2017_Кто здесь? Автоматическая разметка спикеров на телефонны...DataScience Lab 2017_Кто здесь? Автоматическая разметка спикеров на телефонны...
DataScience Lab 2017_Кто здесь? Автоматическая разметка спикеров на телефонны...GeeksLab Odessa
 
DataScience Lab 2017_From bag of texts to bag of clusters_Терпиль Евгений / П...
DataScience Lab 2017_From bag of texts to bag of clusters_Терпиль Евгений / П...DataScience Lab 2017_From bag of texts to bag of clusters_Терпиль Евгений / П...
DataScience Lab 2017_From bag of texts to bag of clusters_Терпиль Евгений / П...GeeksLab Odessa
 
DataScience Lab 2017_Графические вероятностные модели для принятия решений в ...
DataScience Lab 2017_Графические вероятностные модели для принятия решений в ...DataScience Lab 2017_Графические вероятностные модели для принятия решений в ...
DataScience Lab 2017_Графические вероятностные модели для принятия решений в ...GeeksLab Odessa
 
DataScienceLab2017_Оптимизация гиперпараметров машинного обучения при помощи ...
DataScienceLab2017_Оптимизация гиперпараметров машинного обучения при помощи ...DataScienceLab2017_Оптимизация гиперпараметров машинного обучения при помощи ...
DataScienceLab2017_Оптимизация гиперпараметров машинного обучения при помощи ...GeeksLab Odessa
 
DataScienceLab2017_Как знать всё о покупателях (или почти всё)?_Дарина Перемот
DataScienceLab2017_Как знать всё о покупателях (или почти всё)?_Дарина Перемот DataScienceLab2017_Как знать всё о покупателях (или почти всё)?_Дарина Перемот
DataScienceLab2017_Как знать всё о покупателях (или почти всё)?_Дарина Перемот GeeksLab Odessa
 
JS Lab 2017_Mapbox GL: как работают современные интерактивные карты_Владимир ...
JS Lab 2017_Mapbox GL: как работают современные интерактивные карты_Владимир ...JS Lab 2017_Mapbox GL: как работают современные интерактивные карты_Владимир ...
JS Lab 2017_Mapbox GL: как работают современные интерактивные карты_Владимир ...GeeksLab Odessa
 
JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js
JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js
JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js GeeksLab Odessa
 
JS Lab2017_Redux: время двигаться дальше?_Екатерина Лизогубова
JS Lab2017_Redux: время двигаться дальше?_Екатерина ЛизогубоваJS Lab2017_Redux: время двигаться дальше?_Екатерина Лизогубова
JS Lab2017_Redux: время двигаться дальше?_Екатерина ЛизогубоваGeeksLab Odessa
 
JS Lab2017_Lightning Talks_React Perfomance
JS Lab2017_Lightning Talks_React Perfomance JS Lab2017_Lightning Talks_React Perfomance
JS Lab2017_Lightning Talks_React Perfomance GeeksLab Odessa
 
JS Lab2017_Lightning Talks_Рекрутинг.js
JS Lab2017_Lightning Talks_Рекрутинг.js JS Lab2017_Lightning Talks_Рекрутинг.js
JS Lab2017_Lightning Talks_Рекрутинг.js GeeksLab Odessa
 
JS Lab2017_Lightning Talks_PostCSS - there is a plugin for that
JS Lab2017_Lightning Talks_PostCSS - there is a plugin for thatJS Lab2017_Lightning Talks_PostCSS - there is a plugin for that
JS Lab2017_Lightning Talks_PostCSS - there is a plugin for thatGeeksLab Odessa
 
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...GeeksLab Odessa
 
JS Lab2017_Алексей Заславский_React Fiber
JS Lab2017_Алексей Заславский_React Fiber JS Lab2017_Алексей Заславский_React Fiber
JS Lab2017_Алексей Заславский_React Fiber GeeksLab Odessa
 
JS Lab2017_Евгений Сафронов_Тестирование Javascript кода. Инструменты, практи...
JS Lab2017_Евгений Сафронов_Тестирование Javascript кода. Инструменты, практи...JS Lab2017_Евгений Сафронов_Тестирование Javascript кода. Инструменты, практи...
JS Lab2017_Евгений Сафронов_Тестирование Javascript кода. Инструменты, практи...GeeksLab Odessa
 

Plus de GeeksLab Odessa (20)

DataScienceLab2017_Блиц-доклад
DataScienceLab2017_Блиц-докладDataScienceLab2017_Блиц-доклад
DataScienceLab2017_Блиц-доклад
 
DataScienceLab2017_Cервинг моделей, построенных на больших данных с помощью A...
DataScienceLab2017_Cервинг моделей, построенных на больших данных с помощью A...DataScienceLab2017_Cервинг моделей, построенных на больших данных с помощью A...
DataScienceLab2017_Cервинг моделей, построенных на больших данных с помощью A...
 
DataScienceLab2017_BioVec: Word2Vec в задачах анализа геномных данных и биоин...
DataScienceLab2017_BioVec: Word2Vec в задачах анализа геномных данных и биоин...DataScienceLab2017_BioVec: Word2Vec в задачах анализа геномных данных и биоин...
DataScienceLab2017_BioVec: Word2Vec в задачах анализа геномных данных и биоин...
 
DataScienceLab2017_Data Sciences и Big Data в Телекоме_Александр Саенко
DataScienceLab2017_Data Sciences и Big Data в Телекоме_Александр Саенко DataScienceLab2017_Data Sciences и Big Data в Телекоме_Александр Саенко
DataScienceLab2017_Data Sciences и Big Data в Телекоме_Александр Саенко
 
DataScienceLab2017_Высокопроизводительные вычислительные возможности для сист...
DataScienceLab2017_Высокопроизводительные вычислительные возможности для сист...DataScienceLab2017_Высокопроизводительные вычислительные возможности для сист...
DataScienceLab2017_Высокопроизводительные вычислительные возможности для сист...
 
DataScience Lab 2017_Мониторинг модных трендов с помощью глубокого обучения и...
DataScience Lab 2017_Мониторинг модных трендов с помощью глубокого обучения и...DataScience Lab 2017_Мониторинг модных трендов с помощью глубокого обучения и...
DataScience Lab 2017_Мониторинг модных трендов с помощью глубокого обучения и...
 
DataScience Lab 2017_Кто здесь? Автоматическая разметка спикеров на телефонны...
DataScience Lab 2017_Кто здесь? Автоматическая разметка спикеров на телефонны...DataScience Lab 2017_Кто здесь? Автоматическая разметка спикеров на телефонны...
DataScience Lab 2017_Кто здесь? Автоматическая разметка спикеров на телефонны...
 
DataScience Lab 2017_From bag of texts to bag of clusters_Терпиль Евгений / П...
DataScience Lab 2017_From bag of texts to bag of clusters_Терпиль Евгений / П...DataScience Lab 2017_From bag of texts to bag of clusters_Терпиль Евгений / П...
DataScience Lab 2017_From bag of texts to bag of clusters_Терпиль Евгений / П...
 
DataScience Lab 2017_Графические вероятностные модели для принятия решений в ...
DataScience Lab 2017_Графические вероятностные модели для принятия решений в ...DataScience Lab 2017_Графические вероятностные модели для принятия решений в ...
DataScience Lab 2017_Графические вероятностные модели для принятия решений в ...
 
DataScienceLab2017_Оптимизация гиперпараметров машинного обучения при помощи ...
DataScienceLab2017_Оптимизация гиперпараметров машинного обучения при помощи ...DataScienceLab2017_Оптимизация гиперпараметров машинного обучения при помощи ...
DataScienceLab2017_Оптимизация гиперпараметров машинного обучения при помощи ...
 
DataScienceLab2017_Как знать всё о покупателях (или почти всё)?_Дарина Перемот
DataScienceLab2017_Как знать всё о покупателях (или почти всё)?_Дарина Перемот DataScienceLab2017_Как знать всё о покупателях (или почти всё)?_Дарина Перемот
DataScienceLab2017_Как знать всё о покупателях (или почти всё)?_Дарина Перемот
 
JS Lab 2017_Mapbox GL: как работают современные интерактивные карты_Владимир ...
JS Lab 2017_Mapbox GL: как работают современные интерактивные карты_Владимир ...JS Lab 2017_Mapbox GL: как работают современные интерактивные карты_Владимир ...
JS Lab 2017_Mapbox GL: как работают современные интерактивные карты_Владимир ...
 
JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js
JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js
JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js
 
JS Lab2017_Redux: время двигаться дальше?_Екатерина Лизогубова
JS Lab2017_Redux: время двигаться дальше?_Екатерина ЛизогубоваJS Lab2017_Redux: время двигаться дальше?_Екатерина Лизогубова
JS Lab2017_Redux: время двигаться дальше?_Екатерина Лизогубова
 
JS Lab2017_Lightning Talks_React Perfomance
JS Lab2017_Lightning Talks_React Perfomance JS Lab2017_Lightning Talks_React Perfomance
JS Lab2017_Lightning Talks_React Perfomance
 
JS Lab2017_Lightning Talks_Рекрутинг.js
JS Lab2017_Lightning Talks_Рекрутинг.js JS Lab2017_Lightning Talks_Рекрутинг.js
JS Lab2017_Lightning Talks_Рекрутинг.js
 
JS Lab2017_Lightning Talks_PostCSS - there is a plugin for that
JS Lab2017_Lightning Talks_PostCSS - there is a plugin for thatJS Lab2017_Lightning Talks_PostCSS - there is a plugin for that
JS Lab2017_Lightning Talks_PostCSS - there is a plugin for that
 
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
 
JS Lab2017_Алексей Заславский_React Fiber
JS Lab2017_Алексей Заславский_React Fiber JS Lab2017_Алексей Заславский_React Fiber
JS Lab2017_Алексей Заславский_React Fiber
 
JS Lab2017_Евгений Сафронов_Тестирование Javascript кода. Инструменты, практи...
JS Lab2017_Евгений Сафронов_Тестирование Javascript кода. Инструменты, практи...JS Lab2017_Евгений Сафронов_Тестирование Javascript кода. Инструменты, практи...
JS Lab2017_Евгений Сафронов_Тестирование Javascript кода. Инструменты, практи...
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Dernier (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

FrontendLab: 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!
  • 16.
  • 17.
  • 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)