<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Toni D&#39;Angelo on Medium]]></title>
        <description><![CDATA[Stories by Toni D&#39;Angelo on Medium]]></description>
        <link>https://medium.com/@daton89?source=rss-d5696ef0f315------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6AWJpPmRd3hoTqyI.jpeg</url>
            <title>Stories by Toni D&amp;#39;Angelo on Medium</title>
            <link>https://medium.com/@daton89?source=rss-d5696ef0f315------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 22:38:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@daton89/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Single Page Application and SEO]]></title>
            <link>https://medium.com/@daton89/single-page-application-and-seo-8b8aeef510e?source=rss-d5696ef0f315------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b8aeef510e</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[seo]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[angularjs]]></category>
            <category><![CDATA[expressjs]]></category>
            <dc:creator><![CDATA[Toni D'Angelo]]></dc:creator>
            <pubDate>Thu, 14 Jun 2018 13:36:22 GMT</pubDate>
            <atom:updated>2018-06-14T13:36:22.197Z</atom:updated>
            <content:encoded><![CDATA[<p>In the beginning of 2016 i started to work to an ambitious project. This project was already developed as a minimum viable product but it needed a lot of new features, so i decided to start it from scratch.</p><p>In the early 2016 AngularJS was the framework i knew best (in comparison to React and others) so i adopted it to create the client side of the application in combination with NodeJS.</p><p>At that time Angular (2+) hadn’t been released yet (as stable version), so i thought that it could take a while before it would become a mature framework and i decided to use AngularJS.</p><p>Regardless of the framework or library you want to use if you want to implement a single page application you need to do client side routing. In the world of single page apps, there are two types of client side routing: <strong>push-state</strong>, and <strong>hash-based</strong>. Each of these have their strengths and weaknesses.</p><p>Now as you may know, most of the client side routing frameworks focuses on <strong>push-state routing</strong>, using the HTML5 History API and (sometimes) server-side rendering with Node.js. There are a number of reasons for this, the two main ones being:</p><ul><li>The HTML5 History API makes it possible to have multiple routes indexed by Google</li><li>Server-side rendering gives your app a few milliseconds faster load time on the first page load</li></ul><p>Instead, <strong>hash-based routing</strong> works by only considering the part of the URL starting with the # character, which I’ll refer to as the <strong>hash</strong>. This vastly simplifies things for a few reasons:</p><ul><li>The server don’t see the hash, meaning it is handled 100% in-browser</li><li>Changes to the hash do not result in page reloads (dealing with the server)</li><li>Buttons and links are just plain old javascript-free &lt;a&gt; tags</li></ul><p>So let me just put this out there:</p><p><strong>It depends on the cases, so designing your new app with push-state or hash-based routing can be a very difficult choice.</strong></p><p>Most pages of an app could be hidden behind a restricted (under login screen), and thus have at most one<em> </em>page which needs to be indexed by Google. In this case removing #/ from your page URLs is <em>not</em> a benefit. So push-state routing adds enormous complexity for little to no benefit, since your hash-based router can be implemented in less than 30 lines with React for example.</p><p>But for your landing pages for example adding the push state can be a great choice because you can take advantages of the server side to render the initial part of the page where for example you put your meta tags:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6702569bd154f0549a67e893c34418c3/href">https://medium.com/media/6702569bd154f0549a67e893c34418c3/href</a></iframe><p>In this case we are using the client side routing for the user that would like to navigate our website, and at the same time when the website is visited from a crawler can serve different meta tags for each page.</p><p>The example project can be found <a href="https://github.com/daton89/express-routing-angularjs">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b8aeef510e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>