Hi Jesper.
If you are running EPiServer CMS 5, you will find a class called ViewStateMover.cs shipped with the EPiServer templates. Just include the class in you project and enable the ViewStateMover in Web.Config (<add key="enableViewStateMover" value="true" /><add key="enableViewStateMoverWhitespaceRemoval" value="true" />), and you are good to go :)
I had some problem with the ViewStateMover when using XForms in edit mode(the following scripts were removed and newer added again: <script src="/Util/javascript/episerverscriptmanager.js" type="text/javascript"></script>
<script src="/SiteUI/javascript/system.js" type="text/javascript"></script>
<script src="/SiteUI/javascript/system.aspx" type="text/javascript"></script>
<script src="/Util/javascript/common.js" type="text/javascript"></script>), so I added a check so the ViewStateMover was excluded in edit and admin mode.
BR,
Tore
Yes I found that directly after I posted this one and will use it in my CMS 5 project but I was looking for a quickfix for a old CMS 4.5
But I will also test to set viewState=false on some pages
Thanx
There was the old SEOViewState addon to EPiServer that automatically moved the large viewstate data to the end of the HTML page.
I've used it and it was really easy. I think I got it from the EPiMore page. Have a look around.
Hello
is there a standard snippetcode or fix to place the viewstate code to the bottom of the page and by that make it more Google Friendly?
(Google only indexes the first (n) bytes of the page)
best regards
jesper