About Liquid Web

A Leader In Managed Hosting since 1997

Our Heroic Support technicians are located on-site at each of our data centers.
Liquid Web Knowledge Base

Knowledge Base


Linking to Lower Server Load
Filed under: Technical Support

As odd as it may sound, the manner in which you link on a web page can unnecessarily increase load on your server. If you are experiencing server load, reviewing your sites for these linking practices could help.

Absolute vs. Relative Links

When linking to another page on your site, links can contain either absolute or relative paths. Absolute links include the full URL, like so:

<a href=“http://example.com/page.html”>link text</a>

Relative links omit the domain, mentioning only the path to the document you want to link to:

<a href=“page.html”>link text</a>

When linking to internal pages on your site, we recommend using relative paths in your links. Each absolute link generates an additional Apache request, since Apache must assume that the full URL is linking to an external site. Relative links are handled in the same Apache process. Popular pages with multiple “external” links can generate many unneeded Apache processes.

Is This A Subdirectory?

When linking to a subdirectory of your site, it is a good idea to include a trailing slash at the end. The reason has to do with how Apache parses links to subdirectories.

<a href=“example/subdirectory”>link text</a>

When Apache sees the above link, it checks to see if there is a file extension. When it realizes that there is no file extension, and is just a subdirectory, it adds the trailing slash and treats it as a new, separate request.

<a href=“example/subdirectory/”>link text</a>

Including the trailing slash tells Apache up front that yes, this is a subdirectory.

Using relative links to other pages in your site and adding trailing slashes to subdirectory links are two ways to optimize your site code and reduce the request load to your server. If you think that your links might be affecting the load on your server, contact our Heroic Support team using the contact information below, and we can help determine if this is indeed a problem.

===

Liquid Web’s Heroic Support is always available to assist customers with this or any other issue. If you need our assistance please contact us:
Toll Free 1.800.580.4985
International 517.322.0434
support@liquidweb.com
https://manage.liquidweb.com/

Be Sociable, Share!

Related Articles





Copyright © 2011 Liquid Web, Inc. All Rights Reserved.