The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. White Hat / Black Hat SEO
    4. Dust.js Client-side JavaScript Templates & SEO

    Dust.js Client-side JavaScript Templates & SEO

    White Hat / Black Hat SEO
    1 1 2.6k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Bodybuilding.com
      Bodybuilding.com last edited by

      I work for a commerce company and our IT team is pushing to switch our JSP server-side templates over to client-side templates using a JavaScript library called Dust.js

      Dust.js is a JavaScript client-side templating solution that takes the presentation layer away from the data layer.  The problem with front-end solutions like this is they are not SEO friendly because all the content is being served up with JavaScript.

      Dust.js has the ability to render your client-side content server-side if it detects Google bot or a browser with JavaScript turned off but I’m not sold on this as being “safe”.

      Read about Linkedin switching over to Dust.js

      http://engineering.linkedin.com/frontend/leaving-jsps-dust-moving-linkedin-dustjs-client-side-templates

      http://engineering.linkedin.com/frontend/client-side-templating-throwdown-mustache-handlebars-dustjs-and-more

      Explanation of this: “Dust.js server side support: if you have a client that can't execute JavaScript, such as a search engine crawler, a page must be rendered server side. Once written, the same dust.js template can be rendered not only in the browser, but also on the server using node.js or Rhino.”

      Basically what would be happening on the backend of our site, is we would be detecting the user-agent of all traffic and once we found a search bot, serve up our web pages server-side instead client-side to the bots so they can index our site.  Server-side and client-side will be identical content and there will be NO black hat cloaking going on.  The content will be identical.

      But, this technique is Cloaking right?

      From Wikipedia:

      “Cloaking is a SEO technique in which the content presented to the search engine spider is different from that presented to the user's browser. This is done by delivering content based on the IP addresses or the User-Agent HTTP header of the user requesting the page. When a user is identified as a search engine spider, a server-side script delivers a different version of the web page, one that contains content not present on the visible page, or that is present but not searchable.”

      Matt Cutts on Cloaking

      http://support.google.com/webmasters/bin/answer.py?hl=en&answer=66355 Like I said our content will be the same but if you read the very last sentence from Wikipdia it’s the “present but not searchable” that gets me.

      If our content is the same, are we cloaking?

      Should we be developing our site like this for ease of development and performance?

      Do you think client-side templates with server-side solutions are safe from getting us kicked out of search engines?

      Thank you in advance for ANY help with this!

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      • I redesigned a clients website and there is a pretty massive drop in traffic - despite my efforts to significantly improve SEO.
        Harsha_kulkarni
        Harsha_kulkarni
        1
        7
        125

      • Negative seo by Shady SEO Firm?
        DavidMeshah
        DavidMeshah
        0
        5
        195

      • What sort of knowledge differentiates a good SEO from a great SEO?
        EGOL
        EGOL
        0
        3
        71

      • Negative SEO from Spammers Killing Client Rankings
        MarieHaynes
        MarieHaynes
        0
        2
        214

      • What is your SEO agency doing in terms of link building for clients?
        RobLaughton
        RobLaughton
        0
        2
        697

      • href="#" and href="javascript.void()" links. Is there a difference SEO wise?
        AlanMosley
        AlanMosley
        0
        4
        3.5k

      • Are the Majority of SEO Companies 'Spammers, Evildoers, & Opportunists'?
        SVmedia
        SVmedia
        3
        10
        366

      • Could this be negative SEO?
        TheeDigital
        TheeDigital
        0
        4
        319

      Get started with Moz Pro!

      Unlock the power of advanced SEO tools and data-driven insights.

      Start my free trial
      Products
      • Moz Pro
      • Moz Local
      • Moz API
      • Moz Data
      • STAT
      • Product Updates
      Moz Solutions
      • SMB Solutions
      • Agency Solutions
      • Enterprise Solutions
      • Digital Marketers
      Free SEO Tools
      • Domain Authority Checker
      • Link Explorer
      • Keyword Explorer
      • Competitive Research
      • Brand Authority Checker
      • Local Citation Checker
      • MozBar Extension
      • MozCast
      Resources
      • Blog
      • SEO Learning Center
      • Help Hub
      • Beginner's Guide to SEO
      • How-to Guides
      • Moz Academy
      • API Docs
      About Moz
      • About
      • Team
      • Careers
      • Contact
      Why Moz
      • Case Studies
      • Testimonials
      Get Involved
      • Become an Affiliate
      • MozCon
      • Webinars
      • Practical Marketer Series
      • MozPod
      Connect with us

      Contact the Help team

      Join our newsletter
      Moz logo
      © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
      • Accessibility
      • Terms of Use
      • Privacy