| Purpose: To get the URL (unique address) of the current web page Code: CGI, HTML
Most web servers have CGI (Common Gateway Interface) variables that you can use to get the URL of the current web page. How can this be useful? This information can be used if you have a piece of code on various pages and you want to use the current URL in that code. Rather than having to manually put that in for each page you use the code on you can just use a variable to stand for the URL. |