Software Development Insights | Daffodil Software

5 Simple Yet Proven Ways to Enhance Website Performance Overnight

Written by Team Daffodil | Aug 18, 2015 6:30:50 PM

Every business is on web in today's world. This fact alone makes it increasingly important to make sure a company's website is updated and performing. Any lapse in website performance can lead to loss to precious customers and tons of bad customer reviews. Here a 5 simple yet proven tips to enhance your website performance by 40%.

We understand this criterion which requires utmost attention of both the developers and the business owner. And as we handle the technological side of a business it is our responsibility to keep coming up with proficient solutions to any and every web performance issue that may or may not arise.

There is a wonderful online tool that we use to firstly access a website's performance. This tool is called Gtmetrix. With reference of this tool and one of our client's website we will lay out to you a guided and comprehensive study.

How to improve your website's performance

 

1. Compress the size of image

The most immediate and trivial of solutions. Major chunk of website load that deters performance and speed is due to uncompressed image.

You can identify these images using the gtmetrix and then use any free online image optimizer tool to your aid.

2. Preform GZip compression

“It reduced web page size of our client to 248 KB from 626 KB i.e. a decrement of 40%!”

doDynamicCompression tells IIS whether it should compress dynamically generated content, i.e. content generated by your scripts (ASP, PHP, ASP.NET etc).

doStaticCompression tells IIS whether to compress static files e.g. PDF's, JPEGS etc that actually exist on the file system.

For this preform following changes in web config

Under <system.webServer>

[php]<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/>
<dynamicTypes>
<add mimeType="text/*" enabled="true"/>
<add mimeType="message/*" enabled="true"/>
<add mimeType="application/javascript" enabled="true"/>
<add mimeType="*/*" enabled="false"/>
</dynamicTypes>
<staticTypes>
<add mimeType="text/*" enabled="true"/>
<add mimeType="message/*" enabled="true"/>
<add mimeType="application/javascript" enabled="true"/>
<add mimeType="*/*" enabled="false"/>
</staticTypes>
</httpCompression>
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="false" />
<httpProtocol>
<customHeaders>
<remove name="ETag"/>
<add name="ETag" value="0" />
<remove name="Vary"></remove>
<add name="Vary" value="Accept-Encoding"></add>
</customHeaders>
</httpProtocol>[/php]

</ system.webServer >

Below techniques are related to Telerik/Sitefinity for RadCompression

Under  <system.web>

Under <httpModules>

[php]<add name="RadCompression" type="Telerik.Web.UI.RadCompression" />[/php]

</ httpModules >

</system.web>

Under <system.webServer>

Under <modules>

[php]<add name="RadCompression" type="Telerik.Web.UI.RadCompression" />[/php]

</modules>

</system.webServer>

After this, and before testing for change, please check that have Dynamic Compression and Static Content Compression installed in your shared hosting server. If not then it is advised that you do it promptly. This is the installation that allows us to perform dynamic or static compression.

For Windows Server 2008 or Windows Server 2008 R2

# On the taskbar, click Start, point to Administrative Tools, and then click Server Manager.

# In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS).

# In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services.

# On the Select Role Services page of the Add Role Services Wizard, select Dynamic Content Compression if you want to install dynamic compression and Static Content Compression if you want to install static compression, and then click Next.

# On the Confirm Installation Selections page, click Install.

# On the Results page, click Close.

For Windows Vista or Windows 7

On the taskbar, click Start, and then click Control Panel.

# In Control Panel, click Programs and Features, and then click Turn Windows Features on or off.

# Expand Internet Information Services, then World Wide Web Services, then Performance Features.

# Select Http Compression Dynamic if you want to install dynamic compression and Static Content Compression if you

# Click OK.

# Return to the IIS Manager, and then stop and restart the IIS service.

3. Minify your CSS make it in one line remove extra spaces.

Like:

Instead of

[php]<style>
#FacultyHeaderName
{
font-size: 20px;
font-weight: bold;
}
#StaffDetailTitle
{
color: #862733;
float: left;
font-weight: bold;
padding-right: 10px;
position: relative;
}
.Staff-Side-Deatil .StaffDetail
{
background-color: #F0F0F0 !important;
float:left;
width: 315px !important;
padding:0 20px 20px;
height:auto !important;
min-height: 300px !important;
}
</style>[/php]

Use Minified CSS

[php]<style>
#FacultyHeaderName{font-size: 20px;font-weight: bold;}
#StaffDetailTitle{color: #862733;float: left;font-weight: bold;padding-right: 10px;position: relative;}
.Staff-Side-Deatil.StaffDetail{background-color: #F0F0F0 !important;float:left;width: 315px !important;padding:0 20px 20px;height:auto !important;min-height: 300px !important;}
</style>[/php]

4. Enable Caching

In sitefinity

Go To Administration

-> Settings

->Advanced

->System

-> Output Cache Setting

Checkout the “Enable Output Cache” Option and “Enable Client    Cache”.

It make a increment of 6% in YSlow Grade of our client’s website.

5. Effective Ways to Improve IIS 7.5 Performance

Configure logging option

With default settings, IIS logs almost everything under the hood.  You either can disable logging option or can select a number of essential events to log in your server. To set logging option, click on “Sites” in IIS server, and then select the parameters that you want to keep as a login for your server. Remember to enable the “feature view” by right clicking on the server name in IIS. In the feature view pane, click on ‘log’ and set the logging feature; to disable logging completely click on the disable option on the right pane. Remember that you can set logging option both in server level and website level.

Disable ASP debugging

When you run your server in the production environment, you may not need to run ASP debugging mode. Stopping debugging mode will save you a great amount of processing power. To disable debugging, click on your server name in IIS and then right click on it to enable feature view. One the right pane, click on ‘compilation’ and then click on ‘debugging properties’. Next, set the following values as given below:

Limit the ASP threads per processor

This limits the number of ASP requests handled by IIS simultaneously. Normally, the default value is 25. The maximum allowed number is 100. You can increase it to 50 and monitor the performance level of your IIS. To change this value click on your server and then double click on ASP under IIS in the feature view mode. Next, click on “limit properties” and set the value, as you consider suitable to match your processing needs.

Modify ASP queue length property

This value represent how often IIS will send “server too busy” message (HTTP error 503) to the users when ASP is receiving high number of requests. If the queue length time is too high, IIS will send “busy message” to users with longer delay, which make the users feel that the server may be out of service.  Too low queue length will cause the server send “server busy message” quite often, consuming resources of the server. If you are unsure about this setting, you can follow Microsoft’s recommendation for one-to-one ratio, which means if you have four processors in your server with ASP thread processor value set to the default 25, you can set the queue length to

25*4=100.

You can change the queue length by going at “limit properties”—the same way you change the ASP thread processor value.

Enable HTTP compression

This feature helps to transfer data faster between IIS and client browsers and saves your bandwidth. You can compress HTTP in both website level and server level. To enable server level http compression, right click on server name in IIS and then double click on compression under IIS on the right pane. You can enable both static and dynamic http compression.

Configure HTTP expires header

This feature helps to minimize the number of http requests send to IIS by website visitors. HTTP expires header will help the client browser to cache webpages and its elements such as images, CSS etc.  To set http expires you need to click on HTTP response headers in the IIS, and then click on “set common headers”. Next select ‘expire web contents” and select the number of days or hours—this is total time your contents will be cached in the client’s browser.

Enable output caching

When you enable output caching, IIS will keep a copy of requested webpages. If a new user requests the very same webpage located in the cache, IIS will send the copy from its cache without reprocessing the contents. Output caching can significantly improve your server response time for dynamic contents.

Connection limits in IIS 7.5

This option can give you to control the connection in three ways: controlling connection timeout, controlling maximum bandwidth per website, controlling concurrent connections.

The default connection timeout for IIS 7.5 is 120 seconds, which means after this time http session will be terminated. When a user visit a page and keeps the page open for indefinite time without any activity, the IIS need to keep the connection alive—this causes IIS to spend computing resources for this connection to keep alive. For better performance, you need to keep this limit as low as possible, but not too short. For example, you can set this limit to 70 seconds. To change connection timeout you need to right click on website in IIS, and click on “manage website” .Then select “advanced settings”. Next, click on connection limits and set the value for connection timeout.

This connection limit option will allow you to set the maximum bandwidth per second and the maximum concurrent connection per second.  The maximum allowed bandwidth make a site use only a certain amount of bandwidth per second—thus improving the performance of other sites in a shared web-hosting environment.

Controlling the number of concurrent connection is another way to improve IIS performance and to improve the security of IIS as well. This option will allow only the specified number of clients to connect to the website at a given moment. So, if any malicious program tries to send numerous connection requests will be rejected by the IIS, and thus prevent your server becoming overloaded with requests during a DDoS attack.

After changing the performance settings, check the performance level of your server by gradually increasing load to a desired level. You can also consider using Google page speed tool to check whether page-loading time has been improved.

The above few techniques will most certainly prove effectual in improving your website performance. I understand the blog was compendious yet it manages to cover any performance woes that one may suffer and the measures to deal with it.

I hope you enjoyed reading the post and for more of such informative and interesting articles, subscribe to our blog and we will keep you posted with the latest happenings in new age technology.