How to enable search engines to capture AJAX content solutions and capture ajax. How to enable the search engine to capture AJAX content solutions and capture more and more ajax websites, and start to use a Single-pageapplication (Single-pageapplication ). The entire website
How to enable search engines to capture AJAX content
More and more websites begin to adopt Single-page application ).
The entire website has only one webpage. Ajax technology is used to load different content based on user input.
The advantage of this approach is that the user experience is good and the traffic is saved. The disadvantage is that
results:http://example.com/Then includehttp://example.com/In your sitemaps and make sure that 5. Optionally, but importantly, test the crawlability of your app:see What's the crawler sees with "Fetch as Googlebot" .Google provides a tool that would allow you to get an idea of the The crawler sees, Fetch as Googlebot. You should use this tool to see whether your implementation are correct and whether the bot can now see all the content of you Want a user to see. It is the also important to the u
When talking about AJAX, many people will think of JavaScript. until now, various search engines have no good way to capture the content generated by javascript, ajax, and flash code. However, many Webmasters like these effects, but the search engines cannot capture the content generated by these codes, so many webmast
More and more websites are starting to adopt "single page Structure" (Single-page application).
The entire site has only one page, using AJAX technology, according to user input, load different content.
The advantage of this approach is that the user experience good, save traffic, the drawback is that Ajax content can not be crawled by search engines. For exa
. History. Pushstate(null, null, $(this). attr(' href '));
Anchorclick($(this). attr(' href '));
E. Preventdefault();
});
Also take into account the user clicks the browser's "forward/Backward" button. This will trigger the Popstate event of the history object.
Window. AddEventListener(' popstate ', function(e) { /c13>
Anchorclick(location. Pathname);
});
By defining the above three pieces of code,
This article mainly introduces the HistoryAPI of JavaScript that enables search engines to capture relevant information about AJAX content. If you need it, you may not find it when you browse Facebook's album, when the page is refreshed locally, the address in the address bar is changed, and it is not a hash method. It uses several new APIs of HTML5 history. As a global variable of window, history is no lon
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.