Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Explanation</h2> <p>First, you need to know that <code>domain.com/#/about</code> will call the '/' route of your server because it doesn't read the # fragment. Your server will render the base of your Backbone.js application and Backbone will trigger the 'about' route.</p> <p>So, you need to declare two routes in Express JS:</p> <ul> <li>/</li> <li>/about</li> </ul> <h2>Code</h2> <pre><code>app.get('/', function(req, res) { // Trigger the routes 'domain.com' and 'domain.com/#/about' // Here render the base of your application }); app.get('/about', function (req, res) { // Trigger the route 'domain.com/about' // Here use templates to generate the right view and render }); </code></pre> <p>I recommend you 3 links for SEO compatibility with Backbone.js by Derick Bailey:</p> <ul> <li><strong>SEO And Accessibility With HTML5 PushState, Part 1: Introducing PushState:</strong> <a href="http://lostechies.com/derickbailey/2011/09/26/seo-and-accessibility-with-html5-pushstate-part-1-introducing-pushstate/" rel="nofollow">http://lostechies.com/derickbailey/2011/09/26/seo-and-accessibility-with-html5-pushstate-part-1-introducing-pushstate/</a></li> <li><strong>SEO And Accessibility With HTML5 PushState, Part 2: Progressive Enhancement With Backbone.js:</strong> <a href="http://lostechies.com/derickbailey/2011/09/26/seo-and-accessibility-with-html5-pushstate-part-2-progressive-enhancement-with-backbone-js/" rel="nofollow">http://lostechies.com/derickbailey/2011/09/26/seo-and-accessibility-with-html5-pushstate-part-2-progressive-enhancement-with-backbone-js/</a></li> <li><strong>SEO And Accessibility With HTML5 PushState, Part 3: The Video:</strong> <a href="http://lostechies.com/derickbailey/2011/10/06/seo-and-accessibility-with-html5-pushstate-part-3-the-video/" rel="nofollow">http://lostechies.com/derickbailey/2011/10/06/seo-and-accessibility-with-html5-pushstate-part-3-the-video/</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload