Active Server Pages

Active Server Pages (ASPs) are part of the Microsoft Active Platform and are primarily used to generate dynamic websites. ASP is a framework or a scripting environment that allows you to send dynamic HTML documents to users after a database query or similar has occurred. In practice, ASPs are HTML documents which are executed on a server before it sends a response to the client. Thus, database queries, form processing, guest books, or forums can be created.

General information

Microsoft no longer supports ASP, which has been in use since 1996. However, it was followed by a successor technology in 2002, namely ASP.NET, which is supposed to make up for disadvantages with respect to the PHP programming language. The integration of a new runtime environment, the Common Language Runtime (CLR) was responsible for ASP.NET’s success. The CLR interprets the code and outputs it, while ASP.NET is compatible with other programming languages and can interpret them if they adhere to the Common Language Infrastructure standard (CLI).

Both HTML tags and various scripts can be integrated into ASPs. ASPs ability to connect with other scripting languages such as Visual Basic Script, JScript, as well as Perl or ActiveX elements make it a particularly popular alternative to PHP. Active Server Pages are still frequently used; particularly in the private sector. The options provided by ASP are comparable to other technologies such as PHP or Java Server Pages (JSP) with respect to its capability. Active Server Pages can communicate with different platforms using the Common Object Model (COM) to add interactive content, or to allow interaction between site and database.

How it works

ASPs often contain scripts, which are small program codes that are executed when a client makes a request to the server. They are integrated on the server side (SSI: server side include) and typically access a database before sending a response to the client. The program code, in other words the actual ASP (or Active Server Page), is actively running on the server. It is a type of server module which searches for and performs the ASP code line in the HTML documents based on a call from a client. Depending on which type of script commands are listed there, the ASP engine will change the output of the HTML document to the client.

This requires a server environment that supports ASP. Since Windows NT and Windows 95, all Windows servers are now equipped with an ASP module as the standard. For other servers, there are extensions such ChiliASP or InstantASP. A text editor that can read and write the HTML syntax suffices in order to modify ASP files with the "*.asp" extension. The server recognizes through the file extension that it must process this file before output to the client.

The files themselves can generally be distinguished from conventional HTML documents by individual lines of code. These lines of code are read by the ASP engine and initiate certain processes, such as invoking a response object to change how a website is output to the client. The source code that is sent to the client no longer includes ASP scripts. Rather, an adjusted copy of the original HTML file is sent. The file with the Active Server Page instructions remains on the server.

An example of an ASP script integration:

pre> This is an ASP file </pre>

You can edit the scripts to be integrated by using VBScript (default) or JScript (depending on definition). This would look like this:

<% @ Language = "JScript"%>
 Response.write (“I’m script that has been edited with JScript!”);
<script language ="VBScript" runat="server">
 Response.write (“I’m script that has been edited with VBScript!”)

Invoking objects using ASP code lines can be done using various objects, methods, and properties. These objects are specifically designed for server-side tasks.

A selection:

  • Response objects: Output to the client is controlled with response objects. Writing rules, redirects, or cache operations can be defined.
  • Server objects: Operations on the server are completed with server objects, such as URL encoding or the creation of objects which can then be referenced later.
  • Request objects: If a client starts a request to the server, request objects can output strings, variables, or cookies.
  • ASPError objects: The Error objects contain data errors, such as error messages, line in the code, or the file.
  • Application object: Application variables could be stored here or static objects can be invoked.
  • Session object: Data from a session can be changed and saved.

ASP provides a range of properties and methods within these various objects, which makes the script environment a powerful tool when creating dynamic websites.

Importance for SEO

If ASPs are generated at the server side, they will be ultimately output as HTML documents. Therefore, various aspects of search engine optimization must be observed in the preparation of the program code. First, it is important to avoid duplicate content. A dynamically generated webpage should always be labeled as such and not be the same as a static HTML document on the same server. A [HTTP Status Code|permanent redirect]] or specifying a canonical URL can handle this so as not to negatively influence the PageRank of both webpages. Two URLs should never share the same content.

Another aspect is the selection of suitable titles: Certain keywords should be included not only in the text, but also as headlines and titles of the website. It is important to ensure that valid HTML is generated. For example, any valid HTML document has only one h1 heading. Other relevant aspects are the use of JavaScript for menus or mixing layout and content with CSS inline elements. Both can have a negative impact on crawling and ranking of a webpage. Generally, the script code and layout code should be outsourced with CSS and referenced in the appropriate files. This also means that the text-to-code ratio has a positive balance.[1]


  1. 10 SEO tips for your ASP.NET website Accessed on 08/24/2015

Web Links


Related Articles