I have some large controls that are swelling my ViewState to 10KB+. Ignoring the discussion about using alternatives to ViewState, I'm trying to minimize any impact my ViewState might have on SEO. Here's what my research has lead me to believe:
A lot of developers like to move ViewState to the bottom of the page by overriding Page.Render. At first glance, this works great but some people experience problems when their site is under load, or if a user gets an itchy trigger finger and submits a form before the page is done rendering (before the ViewState is in place). There are enough question marks here that I want to avoid this technique.
You can check if the UserAgent is a crawler (through various methods) and simply disable ViewState when you're not dealing with a real user. This also appears to do the trick (and in 3 lines of code), but some people are concerned that this is cloaking, and could actually do more harm than good to your SEO. While the intent in this case is obviously not cloaking, the result does render out significantly less KB to crawlers than to actual users and I can see the potential for automated red flags.
I'm not satisfied with either scenario, and I'm not able to find anything more on the topic. My potential solution is to combine the techniques by moving the ViewState to the bottom of the page only when the UserAgent is a crawler.
The crawler doesn't use the ViewState anyway, so the potential pitfalls of moving the ViewState to the bottom don't apply.
The same content gets delivered to crawlers and real users, albeit in a different order.
The crawler sees all my juicy keywords right there in the first few KB of the page.
I was hoping that I could get some feedback on this technique, especially the following:
Could this still be considered cloaking?
Are there any potential issues with this approach?
Am I overthinking it? Is there an easier approach that I wasn't able to find through Google?