Username: Save?
Password:
Home Forum Links Search Login Register*
    News: Welcome to the TechnoWorldInc! Community!
Recent Updates
[Yesterday at 11:48:22 AM]

[Yesterday at 11:48:22 AM]

[Yesterday at 11:48:22 AM]

[Yesterday at 11:48:22 AM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[February 14, 2024, 02:00:39 PM]
Subscriptions
Get Latest Tech Updates For Free!
Resources
   Travelikers
   Funistan
   PrettyGalz
   Techlap
   FreeThemes
   Videsta
   Glamistan
   BachatMela
   GlamGalz
   Techzug
   Vidsage
   Funzug
   WorldHostInc
   Funfani
   FilmyMama
   Uploaded.Tech
   MegaPixelShop
   Netens
   Funotic
   FreeJobsInc
   FilesPark
Participate in the fastest growing Technical Encyclopedia! This website is 100% Free. Please register or login using the login box above if you have already registered. You will need to be logged in to reply, make new topics and to access all the areas. Registration is free! Click Here To Register.
+ Techno World Inc - The Best Technical Encyclopedia Online! » Forum » THE TECHNO CLUB [ TECHNOWORLDINC.COM ] » Programming Zone » ASP .NET
  Optimize ASP.NET pages by reducing the size of the VIEWSTATE to rank higher on
Pages: [1]   Go Down
  Print  
Author Topic: Optimize ASP.NET pages by reducing the size of the VIEWSTATE to rank higher on  (Read 2035 times)
Daniel Franklin
TWI Hero
**********


Karma: 3
Offline Offline

Posts: 16647


View Profile Email




There are many issues with view state in ASP.NET 1.x. It is on by default, and unless you know to look for it and disable it when it is not needed, it can significantly increase the amount of data rendered by your page. This becomes particularly painful when you use data-bound controls, all of which use view state to save their state across post backs.

You need to ensure that you only use the VIEWSTATE property for the page and controls where necessary so that the size of the value for the hidden field of _VIEWSTATE is minimum. This will ensure that your page loads fast and that the search engines can retrieve the actual content of your page.

Some search engines only read a certain set of characters from the top (that's why you have most SEO specialists mentioning that you should have your keywords on the top of the page) and the bottom of the page. If the value of the hidden field of _VIEWSTATE is long on your page then these search engines would not be able to get to the actual content of your page as a result it would never map the keywords (keywords density) and you would have a low ranking on these search engines.

How to decrease the size of the view state?

a. As mentioned before the VIEWSTATE for any page is set to TRUE by default. If you do not require the controls or the page to hold the VIEWSTATE you can disable the VIEWSTATE for the page completely by adding the directive to the page. (Usually if you have a page that does not post back to itself you can disable the VIEWSTATE on these pages.)

b. You can selectively disable the VIEWSTATE of the controls, datagrids etc that you use on the page if these controls do not post back to the same page.

You will see a considerable difference in the page size and the loading time of the page once you disable the VIEWSTATE of the controls or the page. This will also be evident from the size of the base64-encoded string in the value field of the hidden field of _VIEWSTATE. By disabling the VIEWSTATE for a couple of datagrid controls on one of the pages of our clients website, we were able to reduce the VIEWSTATE of the page from 10,000 characters to 1000 characters and the page size also reduced by a few kilobytes (KB).

Articles Source - Free Articles

Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Copyright © 2006-2023 TechnoWorldInc.com. All Rights Reserved. Privacy Policy | Disclaimer
Page created in 0.131 seconds with 24 queries.