We have learned how a simple web page can build. Now in this section, we will learn what file extensions in a web page are. Most of the web pages run on UNIX web server like Marcs, which do not require a file extension, only filenames are enough for disguising between the files. The file extension is key to recognize which file and format running in that file. How will the server uses and access it?
List of HTML extensions
.html / .htm
HTML and HTM both are the same things both referred to as hypertext markup language and the same file type. The only difference between these two is that the Windows 3 X and DOS computers refer to three-character suffix by that time. Now the servers accept both the files extension as it. It is up to the user which extension he wants to use. .htm files serve the same purpose to the server as .html does. An example of a web with HTML and Html extension is given below:
When the HTML is dynamically created that has other file extensions depending on the server type forms another scripting language called PHP called Hypertext Preprocessor. It is an open-source, server-scripting language. It is very popular now a day because it provides a facility for interactive web page development with dynamic content that interacts with databases. A “.php” file is usually a server-side script, which means it has to be placed on the server with PHP installed on it so others can access the web page, or other content scripted in PHP (for example PDF print). However, it may also act as an HTML page with extra PHP code. An example of a web with PHP extension is given below:
.aspx / .asp
ASPX stands for Active Server Page extended / ASP stands for Active Server Pages. The file extension aspx is associated with the Microsoft development technology called ASP.NET. it’s a free technology that used to create a small website up to a large inventiveness website. Internet servers generate these pages. The ASP.NET code is compiled and interpreted by the server and then sent to a user web browser and displayed as a web page. ASP.NET pages are the main building block for web application development. The Web forms are contained in files with a .aspx extension. These files typically contain static (X) HTML markup, as well as markup defining server-side Web Controls and User Controls where the developers place all the required static and dynamic content for the web page. ASPX script files can be written in Microsoft Visual Studio, WebMatrix or other development tools, and web pages, that are written in ASP.NET and using ASP.NET, can be viewed in any Internet browser such as Internet Explorer, Firefox, Opera, Chrome or Safari. An example of a web with aspx extension is given below:
The asp file extension is associated with the Microsoft Active Server Page source code script file. The .asp files are used to create dynamically generated websites and other webpage content. The ASP code is inserted into static HTML pages with < %%> tags by default, although these tags can be changed to anything you would like. Therefore, like, if you were a PHP programmer forced by his workplace to use ASP, you could change those percentage signs to question marks. The ASP is Microsoft’s proprietary answer to PHP server-side scripting language or Cold Fusion. The new version of ASP and not backward compatible is asp.net. Technically it is not a scripting language it’s an object modeling language on the server-side.
JSP stands for Java Server Page. HTML pages can be run through “.jsp” extensions. We can run any HTML pages using the JSP extension without any changes in the HTML code of the page. For example, if you have any HTML page with an extension of .html, rename the extension to .jsp and run the page, but the page takes some time to load only the first time and next time it will load fast.
When the JSP file is run for the 1st time, the page will be compiled and loaded. After the 1st load if you run the page again and the page load fast. If you do any changes to the JSP page, the JSP will compile the page again and load the page. JSP extension needed only if we are writing the dynamic HTML page else we can use .html or .htm extension.