5 Performance Optimization Tips for your ASP.Net Websites

Posted by Deepa Ranganathan
4
Nov 30, 2015
455 Views
Image
If you miss that 3 second time frame, you technically miss out on the opportunity to keep your user engaged on your site. 4 out of 5 users will move on to another website if your speed is slow. Well, technically no one ever talks of the fifth user ever, as that user is not considered in your scope. Basically, your site’s performance should match your user’s needs, so that you can improve your user base, and reach out to more people.

Even Google has to keep its performance in sync with the 3 second need. Google’s search engine once experienced a 500 ms delay in its loading time, which led to a drop in the traffic by about 20%. This could be your website! You could be facing this traffic problem.

Performance of a website should be as important as the website development itself. If the performance of the website is accounted for, your website will load faster, and you will get better conversions. After all, you need conversions to build a profitable business, don’t you?

Here are some performance optimization tips that you can use to improve the performance of your ASP.Net websites.

The Right ASP.Net Framework

When you are thinking of performance, you need the right ASP.Net framework that will help you in improving the performance. ASP.Net 4.5 is the ideal framework for performance based website development. The Garbage Collector feature of ASP.Net 4.5 will help handle the huge websites better. You also have features like Multi Core JIT, compilation improvements     and app suspension in the .Net 4.5 framework.

Compress your Files

You need to ensure that you are much within your bandwidth range. Your website should not exceed the bandwidth requests, and the best way to ensure this would be to compress the static files on your website.

Use the following settings, available with IIS7 and above versions to help compress the file.

<configuration>
<system.webserver>
  <urlcompression dostaticcompression=""true"" dodynamiccompression=""true"">
</urlcompression></system.webserver>
</configuration>

Using this code, you can easily compress the content that is being sent from your website, thus reducing the bandwidth usage. In case you are using Windows Server 2008 R2 (IIS7.5).

Reducing the Number of Requests


When you are developing a website, there are a lot of JS and CSS files being used in the whole procedure to get the static content ready. These files are served on request basis, and can consume bandwidth majorly. If you are using ASP.Net framework, it tends to reduce the number of requests to the server by minifying both the CSS and JS files. There are several tools, which you can integrate to this platform, which can help minify the files.

In the minification process, the file size is reduced considerably by removing the comments, shortening the variables and removing the spaces. The Http headers are removed as a result of the bundling process, which means individual requests are reduced.

Control on Image Requests

You will need to establish a control over the image requests, if you are planning to optimize the performance of your website. For this, you will need to create an image sprite, which will contain multiple images in a single large image. You can reposition the images by using CSS. Another option is to use Base64 Data URIs. You don’t need to make requests to the server for the images; instead the images would be embedded in your stylesheet.

.main-content {
    background: url('data:image/png;base64,iVBORw0KGgoA………..+ ')
    padding-left: 10px;
    padding-top: 30px;
}

You can even set expiry headers to your static content. In case, the expiry date is set in future, the browser will not request the server, but use the internal cache to serve the content.

Caching HTML

All websites have some page that never gets updated. If your website also possesses such pages, then instead of wasting your bandwidth in requesting these pages, you should cache these pages. An excellent example of this would be web forms, which you can cache using the ASP.Net Output Caching. You can even modify the response headers for caching with the ASP.Net Web Pages.

Conclusion

With ASP.Net, you will need to optimize the performance of your website so that the site loads fast, and offers good experience. The right framework as far as performance optimization goes would be .Net 4.5. Hire ASP.Net Developers from Asp.Net Development Company to get the best possible services and websites.

Comments
avatar
Please sign in to add comment.