In my one of interview questio ask by interviewer.
how you will reduce the page size in asp.net ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That’s a bad interview question, because the only thing inherent in ASP.NET that affects the page size is the ViewState (and even then it doesn’t apply to MVC). ViewState itself rarely accounts for more than a kilobyte or two, any more and your page is likely poorly designed in the first place.
Everything else is just going to be pure HTML, which is either HTML you wrote yourself, or HTML generated by poor controls, DataGrid comes to mind. However reducing the page’s size should not be your objective: removing ViewState or swapping a feature-rich control for something else is going to cause serious problems with the page’s functionality. Granted the page should have been better designed from the beginning (avoid
WebControlsas much as possible, preferSystem.Web.UI.HtmlControlsinstead).The only other thing I can think of are heavy deployments of the older ASP.NET AJAX javascripts, of course they’re aggresivly cached. ASP.NET AJAX was a bit on the heavy side compared to frameworks like jQuery and jQuery UI (where you can remove parts you don’t use, thus reducing the size further), but this is a symptom of poor design rather than something inherent in the platform.
However, all things considered, the size of a page really doesn’t matter anymore. There was a time when squeezing every byte out of a page mattered, back when we were on 5KBps dial-up lines, but now it’s safe to assume your visitor has a speed of at least 1mbps (even my 3G dongle gets 8mbps), the user-experience difference between a 10KB page and a 100KB page is minimal now.