Auto-loading content via AJAX - best practices
-
We have an ecommerce website and I'm looking at replacing the pagination on our category pages with functionality that auto-loads the products as the user scrolls. There are a number of big websites that do this - MyFonts and Kickstarter are two that spring to mind.
Obviously if we are loading the content in via AJAX then search engine spiders aren't going to be able to crawl our categories in the same way they can now. I'm wondering what the best way to get around this is.
Some ideas that spring to mind are:
-
detect the user agent and if the visitor is a spider, show them the old-style pagination instead of the AJAX version
-
make sure we submit an updated Google sitemap every day (I'm not sure if this a reasonable substitute for Google being able to properly crawl our site)
Are there any best practices surrounding this approach to pagination? Surely the bigger sites that do this must have had to deal with these issues?
Any advice would be much appreciated!
-
-
Hi Paul,
Pagination is always a bit of a sticky area!
Firstly I certainly wouldn't do any user agent detection, you don't wanna get busted for cloaking when you aren't even up to anything that naughty.
A nice way i've seen this handled (for wordpress sites although the idea can work on any site) is with the wordpress infinite scroll plugin : http://wordpress.org/extend/plugins/infinite-scroll/
That basically leaves the site as it is for non-javascript web browsers (so with page 1, 2 3 etc.) but if you have js enabled (i.e. not a spider bot) it will keep scrolling the page. This functionality could I guess be changed to create a pagination effect.
Tie this is with some rel="prev" and rel="next" markeup (http://googlewebmastercentral.blogspot.co.uk/2011/09/pagination-with-relnext-and-relprev.html) and I think that is certainly one way to fix the problem.
Another way could be using similar markup for a 'View All' page : http://googlewebmastercentral.blogspot.co.uk/2011/09/view-all-in-search-results.html
Hope that helps!
Stuart
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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.
Related Questions
-
Content in Accordion doesn't rank as well as Content in Text box?
Does content rank better in a full view text layout, rather than in a clickable accordion? I read somewhere because users need to click into an accordion it may not rank as well, as it may be considered hidden on the page - is this true? accordion example: see features: https://www.workday.com/en-us/applications/student.html
Technical SEO | | DigitalCRO1 -
Google's ability to crawl AJAX rendered content
I would like to make a change to the way our main navigation is currently rendered on our e-commerce site. Currently, all of the content that appears when you click a navigation category is rendering on page load. This is currently a large portion of every page visit’s bandwidth and even the images are downloaded even if a user doesn’t choose to use the navigation. I’d like to change it so the content appears and is downloaded only IF the user clicks on it, I'm planning on using AJAX. As that is the case it wouldn’t not be automatically on the site(which may or may not mean Google would crawl it). As we already provide a sitemap.xml for Google I want to make sure this change would not adversely affect our SEO. As of October this year the Webmaster AJAX crawling doc. suggestions has been depreciated. While the new version does say that its crawlers are smart enough to render AJAX content, something I've tested, I'm not sure if that only applies to content injected on page load as opposed to in click like I'm planning to do.
Technical SEO | | znotes0 -
How many tiers are the best?
I am working the SEO from my website and I don't know how many Tiers I need. I have read a lot but people always says different things. What do you think? Thanks for your help friends! Regards, Carlos Zambrana
Technical SEO | | CarlosZambrana0 -
What are some best practices for optimizing alternate versions of a brand name?
What are the best methods for ensuring that the correct spelling/formatting of a brand name rank in the SERP when an alternate formatting/spelling of the brand name is searched. Take for example the brand name (made up for example purposes), "SuperFry". Many customers search using the term "Super Fry" (with a space). To make things worse, not only does Google not return the brand name SuperFry, but it also auto corrects to another brand name "Super-Fri". Is there a common best practice to ensure the customer finds the intended brand name when they simply add a space in the search term? I assume a quick fix would be to create an ad words campaign for the alternate spellings/formatting. What about an organic solution? Perhaps we could create a special page talking about the alternate ways to spell the brand name? Would this solution send mixed signals to Google and potential hurt the over all rankings? Thanks much for any advice!
Technical SEO | | Vspeed0 -
Pages with content defined by querystring
I have a page that show traveltips: http://www.spies.dk/spanien/alcudia/rejsemalstips-liste This page shows all traveltips for Alcudia. Each traveltip also has its own url: http://www.spies.dk/spanien/alcudia/rejsemalstips?TravelTipsId=19767 ( 2 weeks ago i noticed the url http://www.spies.dk/spanien/alcudia/rejsemalstips show up in google webmaster tools as a 404 page, along with 100 of others urls to the subpage /rejsemalstips WITHOUT a querystring. With no querystring there is no content on the page and it goes 404. I need my technicians to redirect that page so it shows the list, but in the meantime i would like to block it in robots.txt But how do i block a page if it is called without a querystring?
Technical SEO | | alsvik0 -
Best Practice to Remove a Blog
Note: Re-posting since I accidentally marked as answered Hi, I have a blog that has thousands of URL, the blog is a part of my site. I would like to obsolete the blog, I think the best choices are 1. 404 Them: Problem is a large number of 404's. I know this is Ok, but makes me hesitant. 2. meta tag no follow no index. This would be great, but the question is they are already indexed. Thoughts? Thanks PS A 301 redirect to the main page would be flagged as a soft 404
Technical SEO | | Bucky0 -
Is this dangerous (a content question)
Hi I am building a new shop with unique products but I also want to offer tips and articles on the same topic as the products (fishing). I think if was to add the articles and advice one piece at a time it would look very empty and give little reason to come back very often. The plan, therefore, is to launch the site pulling articles from a number of article websites - with the site's permission. Obviously this would be 100% duplicate content but it would make the user experience much better and offer added value to my site as people are likely to keep returning even when not in the mood to purchase anything; it also offers the potential for people to email links to friends etc. note: over time we will be adding more unique content and slowly turning off the pulled articled. Anyway, from an seo point of view I know the duplicate content would harm the site but if I was to tell google not to index the directory and block it from even crawling the directory would it still know there is duplicate content on the site and apply the penalty to the non duplicate pages? I'm guessing no but always worth a second opinion. Thanks Carl
Technical SEO | | Grumpy_Carl0 -
How does Google determine freshness of content?
With the changes in the Google algorithm emphasizing freshness of content, I was wondering how they determine freshness and what constitutes new content. For instance, if I write a major update to a story I published last July, is the amended story fresh? Is there anything I can do in addition to publishing brand new content to make Google sure they see all my new content?
Technical SEO | | KnutDSvendsen0