Online Book Reader

Home Category

Programming Microsoft ASP.NET 4 - Dino Esposito [186]

By Root 5661 0
it would produce a lot of duplicated URLs, confusing engines even more.

Finally, the ASP.NET view state. The view state is a potentially large hidden field usually stored at the beginning of the page, right after the opening

tag. For a while, it was assumed that to make the process quicker, search engines could read only the first chunk of the page (maybe 100 KB). In this way, because the view state is at the top and much of the real content would be out of reach. This is conjecture, however, as there’s currently no evidence that search engines do this.

In the end, moving the view state to the bottom of the page to get some alleged SEO benefits can actually be dangerous because the user, in cases where there’s a very large view state, will likely get the opportunity to post back before the entire content is loaded. This situation, as you can guess, could cause errors.

For completeness, you can move the view state to the bottom of the page using a little-known attribute in the configuration:

Note that regardless of what the attribute name suggests, the attribute has an effect only on system hidden fields. Custom hidden fields defined programmatically will always be emitted in their natural position.

Note

If search engines don’t like JavaScript very much, what about AJAX pages and SEO? AJAX is inherently JavaScript-based, and if your page is built using JavaScript only, well, it will likely not be indexed by engines. A simple test is to try to load the page in the browser with JavaScript disabled. What you see in this test is what a search engine will be able to index. To partially remedy this, you can add static site maps that offer plain HTML links and load at least the initial content of the page statically through the browser and not without JavaScript code. A recommended practice is using tools such as HTMLUnit to automate grabbing a static, scriptless version of your pages. For more information, see http://blog.stevensanderson.com/2010/03/30/using-htmlunit-on-net-for-headless-browser-automation.

Tools for Measuring SEO Level


Wouldn’t it be great if you could run a tool against a public site and get a report about some of the SEO issues it could spot? SEO correctness depends on whether or not (and in which measure) you do the few things listed in the previous section. A tool can easily automate the process of validation and come up with a list of things to fix. From Microsoft, you get the IIS SEO Toolkit: http://www.iis.net/download/seotoolkit. The toolkit includes various modules—Site Analysis, Robots Exclusion, and Sitemaps and Site Indexes.

The Site Analysis module analyzes the content of a Web site and reports suggestions on how to optimize content, structure, and URLs for search engines.

The Robots Exclusion module enables Web site administrators to manage the content of the robots.txt file right from the IIS Manager interface. Created by a site administrator, the file robots.txt contains instructions for search engines regarding which directories and files in the site should not be touched and indexed.

Finally, the Sitemaps and Site Indexes module manages the sitemap files (and indexes) at the site, application, and folder level. This ensures that the sitemap file doesn’t contain broken links and search engines always access fresh and up-to-date navigation information.

Site Navigation


A good navigation system is a fundamental asset for any Web site—for both its human users and search engines. A good navigation system enables any user at any time to know where she is, where she has come from, and where she can go.

A navigation system always appears in the same position within all pages; this makes it a good fit for a master page. It is made of well-described links in which the text inside the anchor is quite clear about the final destination. Links are preferably emphasized using some CSS style and are a static part of the page. The more you use JavaScript, the more you can create appealing menus. However, the more you require from

Return Main Page Previous Page Next Page

®Online Book Reader