Adding Dynamic Content to a Web Site 1,575 Views

Originally all web pages on the Internet were static pages, which is to say that the content of each page remained constant whenever it was viewed. In contrast to this, a dynamic web page can change the way in which is presented depending on various types of user input. Some examples of this include displaying the current date or time, adding calendars to pages, generating forms to collect data or enabling a log-in to a forum or database. There are two ways in which this is done, client-side scripting or server-side scripting.

Adding Dynamic Content to a Web Site
With client-side scripting, the dynamic content is generated on the users’ own browser. The most common way to do this is by using javascript, although there are other programming languages that may be used. The scripts are commonly embedded within the HTML code that generates the page, although more complex scripts may be called from a separate file. The browser executes the script and then displays the page, which will include the output from the script. Common uses of this include displaying the current date and time on a Web page or enabling a drop-down menu.

In contrast to this, server-side scripting relies on the web server to execute the script. These scripts are executed on the server, and then the output is sent to the users’ web browser. Languages such as PHP, Perl or ASP are commonly used for this. There are many ways in which server-side scripting is used, for example, to allow a user to log in to a secure database. If you intend to add dynamic content to your web site, then you will need to check carefully to make sure that your choice of hosting company supports the technology you require. A word of warning here – some companies advertise that they “fully support javascript”, for example. This is misleading as javascript is a client-side technology, and does not require any support at all from the web server. The ability to run javascript or any other client-side script is solely dependant on the users’ own browser.

Server-side scripting, however, does require support from the web server. The choice of which method to use is dependant on the operating system that the web host’s servers are using. A Unix/Linux-based server normally offers support for PHP and Perl, whereas a Windows-based server will support ASP. There are ways to enable a Windows-based server to run PHP or Perl, or vice versa, but in order to ensure full compliance, it is normally best to run the language on the operating system for which it was developed. This may also have other implications as well. If you are planning to use a database, for example, you will need to ensure compatibility with that. Make sure that your choice of web hosting can supply all of your needs, or you just find that adding dynamic content is a waste of your time and resources.
Published : Mon 28 Aug 2017
Updated : Thu 26 Mar 2020


Add Comment

We will be very pleased to hear your feedback about the article or the service we reviewed.

reload, if the code cannot be seen

0 Comments

HomePage Reviews Articles Coupons Register Share on Share on Share on Linked-In Logo SVG