SlideShare une entreprise Scribd logo
1  sur  87
Single Page Apps
SPAs
Gerry White | Rise at Seven
SLIDESHARE.NET/DERGAL
@dergal
Single Page Apps
SPAs PWAs JavaScript and SEO
Gerry White
SEO Director Rise at Seven
Take It Offline
takeitoffline.co.uk
Check it out and come to the
next one!!
WTF is a Spa
@dergal
OK WTF isn’t a spa
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>A Heading</h1>
<p>Some test.</p>
<a href=“/NewURL/”> another page </a>
</body>
</html>
@dergal
A link goes to another page
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>A Heading</h1>
<p>Some test.</p>
<a href=“/anotherpage/”> another page
</a>
</body>
</html>
@dergal
Then … that loads up everything
<!DOCTYPE html>
<html>
<head>
<title>Page Title 2</title>
</head>
<body>
<h1>A new page </h1>
<p>New Content</p>
<a href=“/anotherpage/”> another page
</a>
</body>
</html>
@dergal
4k lines on
Vodafone for
instance
@dergal
4k lines on
Vodafone for
instance
Plus the 138 requests
Single Page Apps do this
better differently
@dergal
When you interact, just the
content you need is pulled
into the page.
Application
Shell Model.
developers.google.com/web/fundamentals/architecture/app-shell
examples - Gmail,
Google Maps,
YouTube, Netflix &
Tinder
examples - Gmail,
Google Maps,
YouTube, Netflix &
Tinder
(bad examples, as they
aren’t designed for
crawling)
Can be a
few pages!
Just Eat
Takeaway
Pages
Click to
menu and
the URL
changes
& they
use real
links
So why do so many SEO folks get a
cold sweat when someone says
“Single Page App”
So why do so many SEO folks get a
cold sweat when someone says
“Single Page App”
Especially if they say its in
React, Vue, Angular
“JavaScript is
Ruining the web”
Barry Adams at Search Leeds,
mentioned why JavaScript is one
of the evils in the digital world.
He had (several) good points.
Screw up SEO
and it costs £££
Developers are not
(often) SEO experts, they
can get it wrong …..
Just a single page!
URL doesn’t change, and it is a long single
page you scroll down.
It’s all about the Parallax
Example of a Pallax scrolling page -
https://codepen.io/StephenKoller/pen/LWBLNW
The URL doesn’t change
As you browse from page to page, the URL in the address bar doesn’t
update. Google needs unique URLs for landing pages.
Untracked
As you click around nothing goes into Analytics
Soft 404s
As apps are handled client side, broken links
will often return the wrong header
JavaScript Links
Google can only read one type of link, there is
a near infinite way of writing them in JavaScript
Heavy code on 1st load
That first load, takes ………… a while
No Opengraph
Facebook and Twitter can’t read JavaScript
rendered metadata
Spider Traps
It is easier than you’d think to create spider
traps in JS that only search engines & SEO
tools will spot
Duplicate Content
If URLs are dynamic, it is often easy to re-write
the URLs in different ways, and if the contents
in JS, it can be challenging for Google not to
de-dupe
Inconsistent URLs
Slashes, caPitalisaTion, dashes
aren’t consistent with html links,
canonical tags, xml sitemap
Tracking Parameters
Tracking parameters can cause a multitude of issues by either
breaking, or causing more spider traps
Fragments and Hashbangs
Google has deprecated the !# but so many developers will find
documentation on it. This is where URLs use # and !
No XML Sitemap
No XML sitemap, which in a JavaScript App is
more important
So we know the
problems …
What are the solutions
Just a single page!
We can use JavaScript on the links to change the URL –
& Google tells us the answer!
https://developers.google.com/search/docs/advanced/javascript/javascri
pt-seo-basics#use-history-api
Tracking
Spas
Tracking interactions on a page is ‘easy’ for a developer (assuming you are using Google
Analytics) there is just a set of decisions to be made by you and your analytics guy
- Is it a page view or an interaction
- Does the tracking need to match the display URL
(usually this is best)
GTM is slightly different – for GTM we recommend pushing events into the datalayer, it is
complicated the first time, but after this, far easier.
Tracking
Spas - GTM
SPA URLs Quick Rant …..
• Consistent, human readable URLs
SPA URLs • Always consistent trailing slashes
SPA URLs • Always consistent CASE (I’d suggest
lower)
SPA URLs • Canonical Tags must match the URL
SPA URLs • Parameters in ‘indexable’ pages are
not great
SPA URLs
Quick Rant …..
• Consistent, human readable URLs
• Always consistent trailing slashes
• Always consistent CASE (I’d suggest
lower)
• Canonical Tags must match the URL
• Parameters in ‘indexable’ pages are
not great
Soft 404s
Soft 404s are one of the biggest
challenges of JavaScript apps – if the
processing is largely handled at a client
side level, but a 404 is a serverside
response.
Soft 404s
• Does it fall outside of a page pattern
• Does it fail to load any content in
Soft 404s
Soft 404s
“…. In client-side rendered single-page apps, routing is
often implemented as client-side routing. In this case,
using meaningful HTTP status codes can be impossible or
impractical. To avoid soft 404 errors when using client-
side rendering and routing, use one of the following
strategies”
developers.google.com/search/docs/advanced/javascript/javascript-seo-basics#avoid-soft-404s
JavaScript Links
Google can only read one type of link, there is a near infinite way of
writing them in JavaScript
JavaScript Links
Google can only read one type of link, there is a near infinite way of
writing them in JavaScript
Click to
menu and
the URL
changes
& they
use real
links
Heavy code on 1st load
That first load, takes ………… a while
No Opengraph
Facebook and Twitter can’t read JS rendered metadata
This isn’t a quick win – you need to make sure that this metadata is pre-rendered.
When Facebook, Twitter, Slack and other tools fetch the page, it needs plain, HTML
metadata
<meta property="og:title" content="This needs to be in the HTML" >
Spider Traps
It is easier than you’d think to create spider traps in
JS that only search engines & SEO tools will spot.
TESTING is the only solution, faceted navigation and
inconsistent links is the curse here.
Test with and without JS in ScreamingFrog
Testing ongoing
I’d also recommend ContentKing, Oncrawl or
another tool that can render the page to regularly
check for issues! A number of cloud based crawlers do not
do JavaScript
Duplicate Content
If URLs are dynamic, it is often easy to re-
write the URLs in different ways, and if the
contents in JS, it can be challenging for
Google not to de-dupe incorrectly. We’ve
seen Google often get this wrong in
JavaScript rendered content
Tracking Parameters
Tracking parameters can cause a multitude of issues by either breaking,
or causing more spider traps
Internal links should always link to canonical versions and either to
absolute (starting with https) or relative to the root of the website so
starting with a / (like “/thisurl)
Just because utm_medium is on one page, it doesn’t need to be on the
next
Fragments and Hashbangs
Google has deprecated the #! in 2015! but so many developers will find
documentation on it…. Incredibly it still seems to work, today, but might
not tomorrow, so is it worth it!
Fragments and Hashbangs
IT MIGHT STILL WORK,
but then might fail tomorrow, so why not make it work correctly right now!!
This should be one of the things you don’t compromise on –
Fragments and SEO
Fragments do have a use in SEO – and that is for in page sections, not new /
different pages.
No XML Sitemap
No XML sitemap, which in a JavaScript App is more
important
1. XML Sitemaps do not need
to be completely
comprehensive
2. You can have multiple XML
Sitemaps
3. XML Sitemaps should be
reasonably up to date
Q. How often does it need to be
updated? You can manually create
multiple xml sitemaps
If you are manually creating them –
do not put in Frequency, Priority or
last updated.
But …. do put in images
XML sitemaps & internal links
& Canonical tags must match!
(see URLs rant!)
And that is it … for SPAs!
Follow me @dergal
Thankyou!
Gerry White
Tweet me @dergal
RiseatSeven.com
Still time?
JS Frameworks
React, Angular, Vue,
it hardly matters what you use, All are largely
equal in terms of SEO.
Personally I am team React
Should I pre-render
It Depends – it is easier on
smaller sites, but more
necessary on larger sites, so
normally yes.
Should I pre-render
“Dynamic rendering is not cloaking”
https://developers.google.com/search/docs/advanced/javascript/dynamic-
rendering
Should I pre-render
“Dynamic rendering is not cloaking”
https://developers.google.com/search/docs/advanced/javascript/dynamic-
rendering
A PWA
SEO and digital dev’s love a sexy TLA and when you’ve got
a SPA you can turn it into a PWA – a progressive web app.
A bit of extra JavaScript and a manifest file means you can
install your SPA, make it work offline and feel like a native
app. Want to see one ?
Service Workers
A service worker is a script that your browser runs in the
background, separate from a web page, opening the door
to features that don't need a web page or user interaction.
Being able to be installed on your phone (or computer) and
used offline means it is more reliable and quicker to find.
The Manifest
tells the browser about your
Progressive Web App and how it
should behave when installed on the
user's desktop or mobile device
web.dev/add-manifest/
A PWA
airhorner.com
Some additional thoughts
Single Page Apps, Progressive Web Apps are the future,
they are often done badly because the SEO Strategy is
missing. What happens when a page is removed? how
does google find all the pages? What are the key landing
pages?
Want to know more – ping me @dergal
Thankyou!
Gerry White
@dergal
RiseatSeven.com

Contenu connexe

Tendances

Tendances (18)

Speed & Performance Optimisation: How to Meet Users' High Expectations - Rach...
Speed & Performance Optimisation: How to Meet Users' High Expectations - Rach...Speed & Performance Optimisation: How to Meet Users' High Expectations - Rach...
Speed & Performance Optimisation: How to Meet Users' High Expectations - Rach...
 
WordPress SEO Mistakes that Kill - BigDigital 2017 - Peter Mead
WordPress SEO Mistakes that Kill - BigDigital 2017 - Peter MeadWordPress SEO Mistakes that Kill - BigDigital 2017 - Peter Mead
WordPress SEO Mistakes that Kill - BigDigital 2017 - Peter Mead
 
Crawling & Indexing for JavaScript Heavy Sites brightonSEO 2021
Crawling & Indexing for JavaScript Heavy Sites brightonSEO 2021Crawling & Indexing for JavaScript Heavy Sites brightonSEO 2021
Crawling & Indexing for JavaScript Heavy Sites brightonSEO 2021
 
B2B SEO: Increase Traffic & Leads in 2020
B2B SEO: Increase Traffic & Leads in 2020B2B SEO: Increase Traffic & Leads in 2020
B2B SEO: Increase Traffic & Leads in 2020
 
Runnings SEO on shoestring budget by Yauhen Khutarniuk
Runnings SEO on shoestring budget by Yauhen KhutarniukRunnings SEO on shoestring budget by Yauhen Khutarniuk
Runnings SEO on shoestring budget by Yauhen Khutarniuk
 
Brighton SEO April 2018 Craig Campbell
Brighton SEO April 2018 Craig CampbellBrighton SEO April 2018 Craig Campbell
Brighton SEO April 2018 Craig Campbell
 
Why You Should Invest in Technical SEO by Ruth Burr Reedy
Why You Should Invest in Technical SEO by Ruth Burr ReedyWhy You Should Invest in Technical SEO by Ruth Burr Reedy
Why You Should Invest in Technical SEO by Ruth Burr Reedy
 
rel canonical audit BrightonSEO September 2018
rel canonical audit BrightonSEO September 2018rel canonical audit BrightonSEO September 2018
rel canonical audit BrightonSEO September 2018
 
Easier and faster tagging with Kermit
Easier and faster tagging with KermitEasier and faster tagging with Kermit
Easier and faster tagging with Kermit
 
How to Reverse Engineer Content - Paddy Moogan
How to Reverse Engineer Content - Paddy MooganHow to Reverse Engineer Content - Paddy Moogan
How to Reverse Engineer Content - Paddy Moogan
 
Enterprise SEO
Enterprise SEOEnterprise SEO
Enterprise SEO
 
BrightonSEO Takeaways September 2017
BrightonSEO Takeaways September 2017BrightonSEO Takeaways September 2017
BrightonSEO Takeaways September 2017
 
Combatting Crawl Bloat & Pruning Your Content Effectively
Combatting Crawl Bloat & Pruning Your Content EffectivelyCombatting Crawl Bloat & Pruning Your Content Effectively
Combatting Crawl Bloat & Pruning Your Content Effectively
 
[TurnDigi 2020] Getting Tech SEO Implemented
[TurnDigi 2020] Getting Tech SEO Implemented[TurnDigi 2020] Getting Tech SEO Implemented
[TurnDigi 2020] Getting Tech SEO Implemented
 
Career Optimization Panel: How to Lift Your Career to New Heights
Career Optimization Panel: How to Lift Your Career to New HeightsCareer Optimization Panel: How to Lift Your Career to New Heights
Career Optimization Panel: How to Lift Your Career to New Heights
 
Googles Latest Changes, WordCamp Atlanta 2019
Googles Latest Changes, WordCamp Atlanta 2019Googles Latest Changes, WordCamp Atlanta 2019
Googles Latest Changes, WordCamp Atlanta 2019
 
Paywall SEO: Digital First Print Second, From 0 to 35k subscribers in a year
Paywall SEO: Digital First Print Second, From 0 to 35k subscribers in a yearPaywall SEO: Digital First Print Second, From 0 to 35k subscribers in a year
Paywall SEO: Digital First Print Second, From 0 to 35k subscribers in a year
 
Developing Technical SEO Skills - Brighton SEO Sept 2021
Developing Technical SEO Skills - Brighton SEO Sept 2021Developing Technical SEO Skills - Brighton SEO Sept 2021
Developing Technical SEO Skills - Brighton SEO Sept 2021
 

Similaire à Single Page Apps - Gerry White @ BrightonSEO

rendre AJAX crawlable par les moteurs
rendre AJAX crawlable par les moteursrendre AJAX crawlable par les moteurs
rendre AJAX crawlable par les moteurs
Serge Esteves
 

Similaire à Single Page Apps - Gerry White @ BrightonSEO (20)

Javascript SEO Devs and SEOs playing nicely
Javascript SEO Devs and SEOs playing nicelyJavascript SEO Devs and SEOs playing nicely
Javascript SEO Devs and SEOs playing nicely
 
The Really Advanced Technical SEO Presentation
The Really Advanced Technical SEO PresentationThe Really Advanced Technical SEO Presentation
The Really Advanced Technical SEO Presentation
 
Seo and analytics basics
Seo and analytics basicsSeo and analytics basics
Seo and analytics basics
 
Article16
Article16Article16
Article16
 
Modern SEO Players Guide
Modern SEO Players GuideModern SEO Players Guide
Modern SEO Players Guide
 
Search Engine Optimisation (SEO) for Drupal
Search Engine Optimisation (SEO) for DrupalSearch Engine Optimisation (SEO) for Drupal
Search Engine Optimisation (SEO) for Drupal
 
eGrove Systems Corporation - PrestaShop Development Services
eGrove Systems Corporation - PrestaShop Development ServiceseGrove Systems Corporation - PrestaShop Development Services
eGrove Systems Corporation - PrestaShop Development Services
 
React seo tips to build seo friendly web applications
React seo tips to build seo friendly web applicationsReact seo tips to build seo friendly web applications
React seo tips to build seo friendly web applications
 
JavaScript SEO Ungagged 2019 Patrick Stox
JavaScript SEO Ungagged 2019 Patrick StoxJavaScript SEO Ungagged 2019 Patrick Stox
JavaScript SEO Ungagged 2019 Patrick Stox
 
Seo checklist
Seo checklistSeo checklist
Seo checklist
 
Website Audit Presentation
Website Audit PresentationWebsite Audit Presentation
Website Audit Presentation
 
Going native with html5 web components
Going native with html5 web componentsGoing native with html5 web components
Going native with html5 web components
 
Java to Golang: An intro by Ryan Dawson Seldon.io
Java to Golang: An intro by Ryan Dawson Seldon.ioJava to Golang: An intro by Ryan Dawson Seldon.io
Java to Golang: An intro by Ryan Dawson Seldon.io
 
SMX_DevTools_Monaco_2.pdf
SMX_DevTools_Monaco_2.pdfSMX_DevTools_Monaco_2.pdf
SMX_DevTools_Monaco_2.pdf
 
Seo guide & tips for web designers
Seo guide & tips for web designersSeo guide & tips for web designers
Seo guide & tips for web designers
 
How to Make React SEO-friendly
How to  Make React SEO-friendlyHow to  Make React SEO-friendly
How to Make React SEO-friendly
 
WordPress SEO in 2014 - WordCamp Baltimore 2014
WordPress SEO in 2014 - WordCamp Baltimore 2014WordPress SEO in 2014 - WordCamp Baltimore 2014
WordPress SEO in 2014 - WordCamp Baltimore 2014
 
rendre AJAX crawlable par les moteurs
rendre AJAX crawlable par les moteursrendre AJAX crawlable par les moteurs
rendre AJAX crawlable par les moteurs
 
WordPress North East (Jan 2021) ~ SEO Fundamentals For WordPress
WordPress North East (Jan 2021) ~ SEO Fundamentals For WordPressWordPress North East (Jan 2021) ~ SEO Fundamentals For WordPress
WordPress North East (Jan 2021) ~ SEO Fundamentals For WordPress
 
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick StoxSMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
 

Plus de Gerry White

Plus de Gerry White (8)

Hreflang - why and how and why not for International SEO
Hreflang - why and how and why not for International SEOHreflang - why and how and why not for International SEO
Hreflang - why and how and why not for International SEO
 
Mobile, the past present and future for Digital marketers
Mobile, the past present and future for Digital marketersMobile, the past present and future for Digital marketers
Mobile, the past present and future for Digital marketers
 
TFM - Using Google Tag Manager for ecom
TFM - Using Google Tag Manager for ecom TFM - Using Google Tag Manager for ecom
TFM - Using Google Tag Manager for ecom
 
GTM Clowns, fun and hacks - Search Elite - May 2017 Gerry White
GTM Clowns, fun and hacks - Search Elite - May 2017 Gerry WhiteGTM Clowns, fun and hacks - Search Elite - May 2017 Gerry White
GTM Clowns, fun and hacks - Search Elite - May 2017 Gerry White
 
Https Webinar slides - SEMRush with Gerry White, Tom Bourlet & Andy Veal
Https Webinar slides - SEMRush with Gerry White, Tom Bourlet & Andy VealHttps Webinar slides - SEMRush with Gerry White, Tom Bourlet & Andy Veal
Https Webinar slides - SEMRush with Gerry White, Tom Bourlet & Andy Veal
 
Site Search - patterns and analysis
Site Search - patterns and analysisSite Search - patterns and analysis
Site Search - patterns and analysis
 
Use Google Docs to monitor SEO by pulling in Google Analytics #BrightonSEO
Use Google Docs to monitor SEO by pulling in Google Analytics #BrightonSEOUse Google Docs to monitor SEO by pulling in Google Analytics #BrightonSEO
Use Google Docs to monitor SEO by pulling in Google Analytics #BrightonSEO
 
Do businesses like the BBC need to invest in SEO Ionsearch 2013
Do businesses like the BBC need to invest in SEO Ionsearch 2013 Do businesses like the BBC need to invest in SEO Ionsearch 2013
Do businesses like the BBC need to invest in SEO Ionsearch 2013
 

Dernier

FULL ENJOY Call Girls In Majnu.Ka.Tilla Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu.Ka.Tilla Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu.Ka.Tilla Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu.Ka.Tilla Delhi Contact Us 8377877756
dollysharma2066
 

Dernier (20)

Best 5 Graphics Designing Course In Chandigarh
Best 5 Graphics Designing Course In ChandigarhBest 5 Graphics Designing Course In Chandigarh
Best 5 Graphics Designing Course In Chandigarh
 
Discover Ardency Elite: Elevate Your Lifestyle
Discover Ardency Elite: Elevate Your LifestyleDiscover Ardency Elite: Elevate Your Lifestyle
Discover Ardency Elite: Elevate Your Lifestyle
 
Social media, ppt. Features, characteristics
Social media, ppt. Features, characteristicsSocial media, ppt. Features, characteristics
Social media, ppt. Features, characteristics
 
Martal Group - B2B Lead Gen Agency - Onboarding Overview
Martal Group - B2B Lead Gen Agency - Onboarding OverviewMartal Group - B2B Lead Gen Agency - Onboarding Overview
Martal Group - B2B Lead Gen Agency - Onboarding Overview
 
Press Release Distribution Evolving with Digital Trends.pdf
Press Release Distribution Evolving with Digital Trends.pdfPress Release Distribution Evolving with Digital Trends.pdf
Press Release Distribution Evolving with Digital Trends.pdf
 
10 Email Marketing Best Practices to Increase Engagements, CTR, And ROI
10 Email Marketing Best Practices to Increase Engagements, CTR, And ROI10 Email Marketing Best Practices to Increase Engagements, CTR, And ROI
10 Email Marketing Best Practices to Increase Engagements, CTR, And ROI
 
The Science of Landing Page Messaging.pdf
The Science of Landing Page Messaging.pdfThe Science of Landing Page Messaging.pdf
The Science of Landing Page Messaging.pdf
 
Unlocking the Mystery of the Voynich Manuscript
Unlocking the Mystery of the Voynich ManuscriptUnlocking the Mystery of the Voynich Manuscript
Unlocking the Mystery of the Voynich Manuscript
 
Five Essential Tools for International SEO - Natalia Witczyk - SearchNorwich 15
Five Essential Tools for International SEO - Natalia Witczyk - SearchNorwich 15Five Essential Tools for International SEO - Natalia Witczyk - SearchNorwich 15
Five Essential Tools for International SEO - Natalia Witczyk - SearchNorwich 15
 
Unraveling the Mystery of The Circleville Letters.pptx
Unraveling the Mystery of The Circleville Letters.pptxUnraveling the Mystery of The Circleville Letters.pptx
Unraveling the Mystery of The Circleville Letters.pptx
 
Social Media Marketing Portfolio - Maharsh Benday
Social Media Marketing Portfolio - Maharsh BendaySocial Media Marketing Portfolio - Maharsh Benday
Social Media Marketing Portfolio - Maharsh Benday
 
Unveiling the Legacy of the Rosetta stone A Key to Ancient Knowledge.pptx
Unveiling the Legacy of the Rosetta stone A Key to Ancient Knowledge.pptxUnveiling the Legacy of the Rosetta stone A Key to Ancient Knowledge.pptx
Unveiling the Legacy of the Rosetta stone A Key to Ancient Knowledge.pptx
 
Analysis of Sineing Website and how to fix
Analysis of Sineing Website and how to fixAnalysis of Sineing Website and how to fix
Analysis of Sineing Website and how to fix
 
Rise and fall of Kulula.com, an airline won consumers by different marketing ...
Rise and fall of Kulula.com, an airline won consumers by different marketing ...Rise and fall of Kulula.com, an airline won consumers by different marketing ...
Rise and fall of Kulula.com, an airline won consumers by different marketing ...
 
Elevate Your Advertising Game: Introducing Billion Broadcaster Lift Advertising
Elevate Your Advertising Game: Introducing Billion Broadcaster Lift AdvertisingElevate Your Advertising Game: Introducing Billion Broadcaster Lift Advertising
Elevate Your Advertising Game: Introducing Billion Broadcaster Lift Advertising
 
What is Google Search Console and What is it provide?
What is Google Search Console and What is it provide?What is Google Search Console and What is it provide?
What is Google Search Console and What is it provide?
 
2024 Social Trends Report V4 from Later.com
2024 Social Trends Report V4 from Later.com2024 Social Trends Report V4 from Later.com
2024 Social Trends Report V4 from Later.com
 
FULL ENJOY Call Girls In Majnu.Ka.Tilla Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu.Ka.Tilla Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu.Ka.Tilla Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu.Ka.Tilla Delhi Contact Us 8377877756
 
20180928 Hofstede Insights Conference Milan The Power of Culture Led Brands.pptx
20180928 Hofstede Insights Conference Milan The Power of Culture Led Brands.pptx20180928 Hofstede Insights Conference Milan The Power of Culture Led Brands.pptx
20180928 Hofstede Insights Conference Milan The Power of Culture Led Brands.pptx
 
Social Media Marketing Portfolio - Maharsh Benday
Social Media Marketing Portfolio - Maharsh BendaySocial Media Marketing Portfolio - Maharsh Benday
Social Media Marketing Portfolio - Maharsh Benday
 

Single Page Apps - Gerry White @ BrightonSEO

  • 1. Single Page Apps SPAs Gerry White | Rise at Seven SLIDESHARE.NET/DERGAL @dergal
  • 2. Single Page Apps SPAs PWAs JavaScript and SEO
  • 3. Gerry White SEO Director Rise at Seven
  • 4. Take It Offline takeitoffline.co.uk Check it out and come to the next one!!
  • 5. WTF is a Spa @dergal
  • 6. OK WTF isn’t a spa <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>A Heading</h1> <p>Some test.</p> <a href=“/NewURL/”> another page </a> </body> </html> @dergal
  • 7. A link goes to another page <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>A Heading</h1> <p>Some test.</p> <a href=“/anotherpage/”> another page </a> </body> </html> @dergal
  • 8. Then … that loads up everything <!DOCTYPE html> <html> <head> <title>Page Title 2</title> </head> <body> <h1>A new page </h1> <p>New Content</p> <a href=“/anotherpage/”> another page </a> </body> </html> @dergal
  • 9. 4k lines on Vodafone for instance @dergal
  • 10. 4k lines on Vodafone for instance Plus the 138 requests
  • 11. Single Page Apps do this better differently @dergal
  • 12. When you interact, just the content you need is pulled into the page.
  • 14. examples - Gmail, Google Maps, YouTube, Netflix & Tinder
  • 15. examples - Gmail, Google Maps, YouTube, Netflix & Tinder (bad examples, as they aren’t designed for crawling)
  • 16. Can be a few pages!
  • 18. Click to menu and the URL changes
  • 20. So why do so many SEO folks get a cold sweat when someone says “Single Page App”
  • 21. So why do so many SEO folks get a cold sweat when someone says “Single Page App” Especially if they say its in React, Vue, Angular
  • 22. “JavaScript is Ruining the web” Barry Adams at Search Leeds, mentioned why JavaScript is one of the evils in the digital world. He had (several) good points.
  • 23. Screw up SEO and it costs £££
  • 24. Developers are not (often) SEO experts, they can get it wrong …..
  • 25. Just a single page! URL doesn’t change, and it is a long single page you scroll down. It’s all about the Parallax Example of a Pallax scrolling page - https://codepen.io/StephenKoller/pen/LWBLNW
  • 26. The URL doesn’t change As you browse from page to page, the URL in the address bar doesn’t update. Google needs unique URLs for landing pages.
  • 27. Untracked As you click around nothing goes into Analytics
  • 28. Soft 404s As apps are handled client side, broken links will often return the wrong header
  • 29. JavaScript Links Google can only read one type of link, there is a near infinite way of writing them in JavaScript
  • 30. Heavy code on 1st load That first load, takes ………… a while
  • 31. No Opengraph Facebook and Twitter can’t read JavaScript rendered metadata
  • 32. Spider Traps It is easier than you’d think to create spider traps in JS that only search engines & SEO tools will spot
  • 33. Duplicate Content If URLs are dynamic, it is often easy to re-write the URLs in different ways, and if the contents in JS, it can be challenging for Google not to de-dupe
  • 34. Inconsistent URLs Slashes, caPitalisaTion, dashes aren’t consistent with html links, canonical tags, xml sitemap
  • 35. Tracking Parameters Tracking parameters can cause a multitude of issues by either breaking, or causing more spider traps
  • 36. Fragments and Hashbangs Google has deprecated the !# but so many developers will find documentation on it. This is where URLs use # and !
  • 37. No XML Sitemap No XML sitemap, which in a JavaScript App is more important
  • 38. So we know the problems … What are the solutions
  • 39. Just a single page! We can use JavaScript on the links to change the URL – & Google tells us the answer! https://developers.google.com/search/docs/advanced/javascript/javascri pt-seo-basics#use-history-api
  • 40.
  • 41.
  • 42. Tracking Spas Tracking interactions on a page is ‘easy’ for a developer (assuming you are using Google Analytics) there is just a set of decisions to be made by you and your analytics guy - Is it a page view or an interaction - Does the tracking need to match the display URL (usually this is best) GTM is slightly different – for GTM we recommend pushing events into the datalayer, it is complicated the first time, but after this, far easier.
  • 44. SPA URLs Quick Rant ….. • Consistent, human readable URLs
  • 45. SPA URLs • Always consistent trailing slashes
  • 46. SPA URLs • Always consistent CASE (I’d suggest lower)
  • 47. SPA URLs • Canonical Tags must match the URL
  • 48. SPA URLs • Parameters in ‘indexable’ pages are not great
  • 49. SPA URLs Quick Rant ….. • Consistent, human readable URLs • Always consistent trailing slashes • Always consistent CASE (I’d suggest lower) • Canonical Tags must match the URL • Parameters in ‘indexable’ pages are not great
  • 50. Soft 404s Soft 404s are one of the biggest challenges of JavaScript apps – if the processing is largely handled at a client side level, but a 404 is a serverside response.
  • 51. Soft 404s • Does it fall outside of a page pattern • Does it fail to load any content in
  • 53. Soft 404s “…. In client-side rendered single-page apps, routing is often implemented as client-side routing. In this case, using meaningful HTTP status codes can be impossible or impractical. To avoid soft 404 errors when using client- side rendering and routing, use one of the following strategies” developers.google.com/search/docs/advanced/javascript/javascript-seo-basics#avoid-soft-404s
  • 54. JavaScript Links Google can only read one type of link, there is a near infinite way of writing them in JavaScript
  • 55. JavaScript Links Google can only read one type of link, there is a near infinite way of writing them in JavaScript
  • 56. Click to menu and the URL changes
  • 58. Heavy code on 1st load That first load, takes ………… a while
  • 59. No Opengraph Facebook and Twitter can’t read JS rendered metadata This isn’t a quick win – you need to make sure that this metadata is pre-rendered. When Facebook, Twitter, Slack and other tools fetch the page, it needs plain, HTML metadata <meta property="og:title" content="This needs to be in the HTML" >
  • 60. Spider Traps It is easier than you’d think to create spider traps in JS that only search engines & SEO tools will spot. TESTING is the only solution, faceted navigation and inconsistent links is the curse here. Test with and without JS in ScreamingFrog
  • 61. Testing ongoing I’d also recommend ContentKing, Oncrawl or another tool that can render the page to regularly check for issues! A number of cloud based crawlers do not do JavaScript
  • 62. Duplicate Content If URLs are dynamic, it is often easy to re- write the URLs in different ways, and if the contents in JS, it can be challenging for Google not to de-dupe incorrectly. We’ve seen Google often get this wrong in JavaScript rendered content
  • 63. Tracking Parameters Tracking parameters can cause a multitude of issues by either breaking, or causing more spider traps
  • 64. Internal links should always link to canonical versions and either to absolute (starting with https) or relative to the root of the website so starting with a / (like “/thisurl) Just because utm_medium is on one page, it doesn’t need to be on the next
  • 65. Fragments and Hashbangs Google has deprecated the #! in 2015! but so many developers will find documentation on it…. Incredibly it still seems to work, today, but might not tomorrow, so is it worth it!
  • 66. Fragments and Hashbangs IT MIGHT STILL WORK, but then might fail tomorrow, so why not make it work correctly right now!! This should be one of the things you don’t compromise on –
  • 67. Fragments and SEO Fragments do have a use in SEO – and that is for in page sections, not new / different pages.
  • 68. No XML Sitemap No XML sitemap, which in a JavaScript App is more important
  • 69. 1. XML Sitemaps do not need to be completely comprehensive
  • 70. 2. You can have multiple XML Sitemaps
  • 71. 3. XML Sitemaps should be reasonably up to date
  • 72. Q. How often does it need to be updated? You can manually create multiple xml sitemaps
  • 73. If you are manually creating them – do not put in Frequency, Priority or last updated. But …. do put in images
  • 74. XML sitemaps & internal links & Canonical tags must match! (see URLs rant!)
  • 75. And that is it … for SPAs! Follow me @dergal
  • 76. Thankyou! Gerry White Tweet me @dergal RiseatSeven.com
  • 78. JS Frameworks React, Angular, Vue, it hardly matters what you use, All are largely equal in terms of SEO. Personally I am team React
  • 79. Should I pre-render It Depends – it is easier on smaller sites, but more necessary on larger sites, so normally yes.
  • 80. Should I pre-render “Dynamic rendering is not cloaking” https://developers.google.com/search/docs/advanced/javascript/dynamic- rendering
  • 81. Should I pre-render “Dynamic rendering is not cloaking” https://developers.google.com/search/docs/advanced/javascript/dynamic- rendering
  • 82. A PWA SEO and digital dev’s love a sexy TLA and when you’ve got a SPA you can turn it into a PWA – a progressive web app. A bit of extra JavaScript and a manifest file means you can install your SPA, make it work offline and feel like a native app. Want to see one ?
  • 83. Service Workers A service worker is a script that your browser runs in the background, separate from a web page, opening the door to features that don't need a web page or user interaction. Being able to be installed on your phone (or computer) and used offline means it is more reliable and quicker to find.
  • 84. The Manifest tells the browser about your Progressive Web App and how it should behave when installed on the user's desktop or mobile device web.dev/add-manifest/
  • 86. Some additional thoughts Single Page Apps, Progressive Web Apps are the future, they are often done badly because the SEO Strategy is missing. What happens when a page is removed? how does google find all the pages? What are the key landing pages? Want to know more – ping me @dergal