How to decrease the page load time in ASP.NET application? What should be the precautions and specially when we are interacting with databases
e.g.
Set in web.config when deploying the app
etc
Some of the key "take-aways" from TechEd 2010 North America:
<compilation debug=”false">
in web.config when deploying the app.You can watch the sessions online here, they're both highly recommended:
80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc.
http://developer.yahoo.com/performance/rules.html
I'm not suggesting ignore the view state and database caching suggestions in the answers already provided. I'm pointing that for what I've found to be simplier alterations is to go for turning on GZip Compression in IIS, setting expiry headers on static elements to reduce server requests, optimize images using a tool such as smush.it
Run a report of your site using Zoompf for a very detailed report with estimate impact and easy of implementation ratings.
Never ever Deploy asp.net application under debug configuration on production. Find out here what scottgu has to say about this.
Use Cookie-less domains to serve static resources like images, scripts, styles etc. Each client request is sent along with whole bunch of cookies, you don't need cookies while serving pictures or scripts. So host those resources on a cookie-less domain.
Minify scripts, stylesheets and HTML response from the server. Removing unnecessary line-breaks and white-spaces can improve the time-to-load and bandwidth optimization.
You'll find many tips from here.
Always measure after you refactored something to see if it makes a difference.
Also please take a look here for more information.
Grz, Kris.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With