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

              • wearehappymedia

                Should we set up redirects for all deleted TAGS?

                We recently found our site had 65,000 tags (yes 65K). In an effort to consolidate these we've started deleting them. MOZ is now reporting a heap of 404 errors for tag pages. These tag pages should not have links to them so not sure how come they're being crawled. Any suggestions from experience in this area would be useful.

                Technical SEO | Aug 24, 2020, 11:39 AM | wearehappymedia
                0
              • d.bird

                Google has deindexed a page it thinks is set to 'noindex', but is in fact still set to 'index'

                A page on our WordPress powered website has had an error message thrown up in GSC to say it is included in the sitemap but set to 'noindex'. The page has also been removed from Google's search results. Page is https://www.onlinemortgageadvisor.co.uk/bad-credit-mortgages/how-to-get-a-mortgage-with-bad-credit/ Looking at the page code, plus using Screaming Frog and Ahrefs crawlers, the page is very clearly still set to 'index'. The SEO plugin we use has not been changed to 'noindex' the page. I have asked for it to be reindexed via GSC but I'm concerned why Google thinks this page was asked to be noindexed. Can anyone help with this one? Has anyone seen this before, been hit with this recently, got any advice...?

                Technical SEO | May 17, 2022, 1:50 PM | d.bird
                0
              • BWallacejr

                SERP Title shows up-with-dashes

                Occasionally I see the our 'listings' on Google where the Title line shows up with dashes... like sony-professional-hard-drive - TapeandMedia.com It appears to be the URL shortened and rehashed.  This example was after I searched for "Sony PSZ-HA1T"  without the quotes.  The title for this page is <title></span><span class="html-tag">Sony 1TB Professional Portable External Hard Disk Drive (PSZ-HA1T)</span><span class="html-tag"></title> and the url is http://www.tapeandmedia.com/sony-1tb-professional-portable-hard-drive.asp Link to image: http://i.imgur.com/FmvAn6c.jpg Other searches (like "Sony 1tb PSZ-HA1T") yield normal looking SERP Titles Does anyone know why this happens and what I can do to avoid this? FmvAn6c.jpg

                Technical SEO | Mar 24, 2015, 11:25 AM | BWallacejr
                0
              • aj613

                Do H2 tags carry more weight than h4 tags?

                Of course H tags are key signals for relevance in search.  Does an h2 tag send a significantly "louder" signal than an h4 tag?

                Technical SEO | Aug 4, 2014, 7:07 PM | aj613
                0
              • Branden_S

                Page titles in browser not matching WP page title

                I have an issue with a few page titles not matching the title I have In WordPress.  I have 2 pages, blog & creative gallery, that show the homepage title, which is causing duplicate title errors.  This has been going on for 5 weeks, so its not an a crawl issue.  Any ideas what could cause this? To clarify, I have the page title set in WP, and I checked "Disable PSP title format on this page/post:"...but this page is still showing the homepage title.  Is there an additional title setting for a page in WP?

                Technical SEO | Jun 18, 2013, 6:28 PM | Branden_S
                0
              • 678648631264

                How do I fix the h1 tag?

                No More Than One H1 Tag Easy fix <dl> <dt>Number of H1s</dt> <dd>2</dd> <dt>Explanation</dt> <dd>Best practices for both SEO and accessibility require only a single H1 tag. The H1 is meant to be the page's headline, and thus, multiple H1s are confusing. Consider employing H2, H3 or CSS styles to achieve the same results with text visualization.</dd> <dt>Recommendation</dt> <dd>Remove multiple instances of the H1 tag, so that only one exists on the page.</dd> <dd>I get this error yet it does not tell me how to fix it. I'm not even sure what the H1 tag is?
                </dd> </dl>

                Technical SEO | Jun 25, 2012, 3:33 PM | 678648631264
                0
              • JasonDGreat

                Why crawl error "title missing or empty" when there is already "title and meta desciption" in place?

                I've been getting 73 "title missing or empty" warnings from SEOMOZ crawl diagnostic. This is weird as I've installed yoast wordpress seo plugin and all posts do have title and meta description. But why the results here.. can anyone explain what's happening? Thanks!! Here are some of the links that are listed with "title missing, empty". Almost all our blog posts were listed there. http://www.gan4hire.com/blog/2011/are-you-here-for-good/ http://www.gan4hire.com/blog/2011/are-you-socially-awkward/ MaeM3.png TLcD8.png

                Technical SEO | Nov 5, 2011, 3:14 PM | JasonDGreat
                0
              • wcksmith

                Use of Meta Tag - MSSmartTagsPreventParsing

                We've inherited some sites from another developer that had the following tag: All references I can find to it are from 2004.  What is the purpose and is it worth including in pages/sites we build?

                Technical SEO | Jun 28, 2011, 7:26 PM | wcksmith
                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

              Access all your tools in one place. Whether you're tracking progress or analyzing data, everything you need is at your fingertips.

              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.