undefined
Skip to content
Moz logo Menu open Menu close
  • Products
    • Moz Pro
    • Moz Pro Home
    • Moz Local
    • Moz Local Home
    • STAT
    • Moz API
    • Moz API Home
    • Compare SEO Products
    • Moz Data
  • Free SEO Tools
    • Domain Analysis
    • Keyword Explorer
    • Link Explorer
    • Competitive Research
    • MozBar
    • More Free SEO Tools
  • Learn SEO
    • Beginner's Guide to SEO
    • SEO Learning Center
    • Moz Academy
    • SEO Q&A
    • Webinars, Whitepapers, & Guides
  • Blog
  • Why Moz
    • Agency Solutions
    • Enterprise Solutions
    • Small Business Solutions
    • Case Studies
    • The Moz Story
    • New Releases
  • Log in
  • Log out
  • Products
    • Moz Pro

      Your all-in-one suite of SEO essentials.

    • Moz Local

      Raise your local SEO visibility with complete local SEO management.

    • STAT

      SERP tracking and analytics for enterprise SEO experts.

    • Moz API

      Power your SEO with our index of over 44 trillion links.

    • Compare SEO Products

      See which Moz SEO solution best meets your business needs.

    • Moz Data

      Power your SEO strategy & AI models with custom data solutions.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Free SEO Tools
    • Domain Analysis

      Get top competitive SEO metrics like DA, top pages and more.

    • Keyword Explorer

      Find traffic-driving keywords with our 1.25 billion+ keyword index.

    • Link Explorer

      Explore over 40 trillion links for powerful backlink data.

    • Competitive Research

      Uncover valuable insights on your organic search competitors.

    • MozBar

      See top SEO metrics for free as you browse the web.

    • More Free SEO Tools

      Explore all the free SEO tools Moz has to offer.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Learn SEO
    • Beginner's Guide to SEO

      The #1 most popular introduction to SEO, trusted by millions.

    • SEO Learning Center

      Broaden your knowledge with SEO resources for all skill levels.

    • On-Demand Webinars

      Learn modern SEO best practices from industry experts.

    • How-To Guides

      Step-by-step guides to search success from the authority on SEO.

    • Moz Academy

      Upskill and get certified with on-demand courses & certifications.

    • SEO Q&A

      Insights & discussions from an SEO community of 500,000+.

    Unlock flexible pricing & new endpoints
    Moz API

    Unlock flexible pricing & new endpoints

    Find your plan
  • Blog
  • Why Moz
    • Small Business Solutions

      Uncover insights to make smarter marketing decisions in less time.

    • Agency Solutions

      Earn & keep valuable clients with unparalleled data & insights.

    • Enterprise Solutions

      Gain a competitive edge in the ever-changing world of search.

    • The Moz Story

      Moz was the first & remains the most trusted SEO company.

    • Case Studies

      Explore how Moz drives ROI with a proven track record of success.

    • New Releases

      Get the scoop on the latest and greatest from Moz.

    Surface actionable competitive intel
    New Feature

    Surface actionable competitive intel

    Learn More
  • Log in
    • Moz Pro
    • Moz Local
    • Moz Local Dashboard
    • Moz API
    • Moz API Dashboard
    • Moz Academy
  • Avatar
    • Moz Home
    • Notifications
    • Account & Billing
    • Manage Users
    • Community Profile
    • My Q&A
    • My Videos
    • Log Out

The Moz Q&A Forum

  • Forum
  • Questions
  • Users
  • Ask the Community

Welcome to the Q&A Forum

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

  1. Home
  2. SEO Tactics
  3. Technical SEO
  4. Setting title tag with javascript/jquery

Moz Q&A is closed.

After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

Setting title tag with javascript/jquery

Technical SEO
3
6
1.6k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as question
Log in to reply
This topic has been deleted. Only users with question management privileges can see it.
  • peterallen
    peterallen last edited by Aug 14, 2013, 7:09 AM

    Hi there,

    I'm looking for some advice. I've recently implemented a few jQuery functions which gets specific content from the page and then sets the title and description.

    See working example here.

    It seems to work fine but my question I have is whether Google bots can read it and whether it might actually hinder my SEO efforts?

    Any advice would be really appreciated!

    Peter

    1 Reply Last reply Reply Quote 0
    • RobertFisher
      RobertFisher @peterallen last edited by Aug 14, 2013, 10:43 AM Aug 14, 2013, 10:43 AM

      I don't think your javascript usage is helping you. I am not sure as to why you would nofollow something you sought to improve for SEO.

      As to speed, you have more issues than your provider's server. Download Google Insights and run the page speed tool. You will see what I mean.

      Best,

      1 Reply Last reply Reply Quote 0
      • peterallen
        peterallen @RobertFisher last edited by Aug 14, 2013, 8:46 AM Aug 14, 2013, 8:46 AM

        Robert,

        Thanks for the reply!

        The main reason for changing the title/description tags with javascript was to make the pages more indexable (and readable on google). Would you say these pages will provide any SEO benefits to the rest of the website? Or would it be better to set a nofollow tag?

        I will have a look into speeding up the property pages however it's most likely because the information is being rendered on our software providers server which at the same time is probably handling 1000's of other requests aswell 😞

        RobertFisher 1 Reply Last reply Aug 14, 2013, 10:43 AM Reply Quote 0
        • peterallen
          peterallen @driftingbass last edited by Aug 14, 2013, 8:39 AM Aug 14, 2013, 8:39 AM

          Thanks for the reply!

          Unfortunately I cannot do this in PHP as the property details are rendered using XML and I don't have access to the files as it's saved on our software providers server (they have also said they would not know how to implement this) - I also have little to no experience with XML so that's why I thought i'd try javascript.

          1 Reply Last reply Reply Quote 0
          • RobertFisher
            RobertFisher last edited by Aug 14, 2013, 8:26 AM Aug 14, 2013, 8:07 AM

            Peter

            I agree with Jon,

            Also, your page is loading quite slowly when I use Google Pagespeed insights. You might want to run it on the site and just look at what it is suggesting.

            Hope this helps you out,

            Robert

            peterallen 1 Reply Last reply Aug 14, 2013, 8:46 AM Reply Quote 1
            • driftingbass
              driftingbass last edited by Aug 14, 2013, 8:26 AM Aug 14, 2013, 7:35 AM

              No, Google won't see it - you're meant to make your site accessible to those with JS turned off. Check using GWT 'fetch as Google'.

              You could, however, do this with PHP.

              peterallen 1 Reply Last reply Aug 14, 2013, 8:39 AM Reply Quote 2
              • 1 / 1
              1 out of 6
              • First post
                1/6
                Last post

              Got a burning SEO question?

              Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


              Start my free trial


              Browse Questions

              Explore more categories

              • Moz Tools

                Chat with the community about the Moz tools.

              • SEO Tactics

                Discuss the SEO process with fellow marketers

              • Community

                Discuss industry events, jobs, and news!

              • Digital Marketing

                Chat about tactics outside of SEO

              • Research & Trends

                Dive into research and trends in the search industry.

              • Support

                Connect on product support and feature requests.

              • See all categories

              Related Questions

              • Tom3_15

                Sudden Indexation of "Index of /wp-content/uploads/"

                Hi all, I have suddenly noticed a massive jump in indexed pages. After performing a "site:" search, it was revealed that the sudden jump was due to the indexation of many pages beginning with the serp title "Index of /wp-content/uploads/" for many uploaded pieces of content & plugins. This has appeared approximately one month after switching to https. I have also noticed a decline in Bing rankings. Does anyone know what is causing/how to fix this? To be clear, these pages are **not **normal /wp-content/uploads/ but rather "index of" pages, being included in Google. Thank you.

                Technical SEO | Sep 4, 2018, 11:15 AM | Tom3_15
                0
              • Vizergy

                Can I set a canonical tag to an anchor link?

                I have a client who is moving to a one page website design.  So, content from the inner pages is being condensed in to sections on the 'home' page.  There will be a navigation that anchor links to each relevant section.  I am wondering if I should leave the old pages and use rel=canonical to point them to their relevant sections on the new 'home' page rather than 301 them.  Thoughts?

                Technical SEO | Mar 10, 2017, 5:36 PM | Vizergy
                0
              • patilhimanshu

                Can OG titles be used as a substitute for Meta titles

                We use og (open graph) titles in lieu of meta titles. Is there any downside to using just one. Should we be using both og and meta titles on our page. Appreciate any insight. Himanshu

                Technical SEO | Dec 15, 2015, 10:49 PM | patilhimanshu
                0
              • ChristianRubio

                Title Tag vs. H1 / H2

                OK, Title tag, no problem, it's the SEO juice, appears on SERP, etc.  Got it. But I'm reading up on H1 and getting conflicting bits of information ... Only use H1 once? H1 is crucial for SERP Use H1s for subheads Google almost never looks past H2 for relevance So say I've got a blog post with three sections ... do I use H1 three times (or does Google think you're playing them ...) Or do I create a "big" H1 subhead and then use H2s? Or just use all H2s because H1s are scary?  🙂 I frequently use subheads, it would seem weird to me to have one a font size bigger than another, but of course I can adjust that in settings ... Thoughts? Lisa

                Technical SEO | Jan 9, 2015, 11:19 AM | ChristianRubio
                0
              • niconico101

                Disallow: /404/ - Best Practice?

                Hello Moz Community, My developer has added this to my robots.txt file: Disallow: /404/ Is this considered good practice in the world of SEO? Would you do it with your clients? I feel he has great development knowledge but isn't too well versed in SEO. Thank you in advanced, Nico.

                Technical SEO | Sep 3, 2013, 1:47 AM | niconico101
                1
              • inlinear

                Correct linking to the /index of a site and subfolders: what's the best practice? link to: domain.com/ or domain.com/index.html ?

                Dear all, starting with my .htaccess file: RewriteEngine On
                RewriteCond %{HTTP_HOST} ^www.inlinear.com$ [NC]
                RewriteRule ^(.*)$ http://inlinear.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^./index.html 
                RewriteRule ^(.)index.html$ http://inlinear.com/ [R=301,L] 1. I redirect all URL-requests with www. to the non www-version...
                2. all requests with "index.html" will be redirected to "domain.com/" My questions are: A) When linking from a page to my frontpage (home) the best practice is?: "http://domain.com/" the best and NOT: "http://domain.com/index.php" B) When linking to the index of a subfolder "http://domain.com/products/index.php" I should link also to: "http://domain.com/products/" and not put also the index.php..., right? C) When I define the canonical ULR, should I also define it just: "http://domain.com/products/" or in this case I should link to the definite file: "http://domain.com/products**/index.php**" Is A) B) the best practice? and C) ? Thanks for all replies! 🙂
                Holger

                Technical SEO | Jul 25, 2013, 6:54 PM | inlinear
                0
              • LukeHutchinson

                Should I include tags in sitemap?

                Hello All, I was wondering if you should include tags and categories in your sitemap. In the past on previous blogs I have always left tags and categories out. The reason for this is a good friend of mine who has been doing SEO for a long time and inhouse always told me that this would result in duplicate content. I thought that it would be a great idea to get some input from the SEOmoz community as this obviously has a big affect on your blog and the number of pages indexed. Any help would be great. Thanks, Luke Hutchinson.

                Technical SEO | Dec 16, 2012, 7:27 PM | LukeHutchinson
                1
              • frankrizzo

                Duplicate page titles on Ecommerce

                Hi, My question is in reference to an E-commerce site- Our SEO MOZ scan is showing many errors for Duplicates- such as Duplicate titles - The majority of these are on the products map- and the page titles are Products Map :: Company Name How do we get correct this or does Google not penalize for it? Thanks.

                Technical SEO | Sep 5, 2012, 1:36 PM | frankrizzo
                0

              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
              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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
              • Accessibility
              • Terms of Use
              • Privacy

              Looks like your connection to Moz was lost, please wait while we try to reconnect.