The “scheme” of a URL is another way to say its protocol.
A protocol is an agreed-upon standard for communicating a particular type of data.
The Commonly Used Protocols are,
HTTP(Hyper Text Transfer Protocol):
HTTP is the Internet protocol specifically designed for use with the World Wide Web,
and therefore is the one most often seen by web surfers.
Normally we call like,
http://<host>:<port>/<path>?<searchpart>
FTP(File Transfer Protocol):
FTP is commonly used for distributing and transmitting files over the Internet.
Normally we call like,
ftp://<user>:<password>@<host>:<port>/<cwd1>/<cwd2>/…/ <cwdN>/<name>;type=<typecode>
Location Object:
The location object is part of the Document Object Model.
Each property of the location object represents a different portion of the URL.
Location Properties:
Href:
The identifier HREF stands for “hypertext reference.”
This property supplies a string of the entire URL of the calling window object.
This property is for both reading and setting.
<HTML>
<SCRIPT LANGUAGE=”JavaScript”>
<!–
function load()
{
location.href = ‘http://www.SampleUrl.com’
}
// –>
</SCRIPT>
<FORM>
<INPUT TYPE=”button” VALUE=” load page ” onClick=”load()”>
</FORM>
</HTML>
Window.location Method:
The Common Used Method for window.location is window.reload.
It will reloads the current document.
<HTML>
<HEAD>
<TITLE>stay connected</TITLE>
</HEAD>
<!– 200000 milliseconds == 200 seconds –>
<BODY onLoad=”timerID = setTimeout(‘window.location.reload(true)’, 200000)”>
</BODY>
</HTML>
Document.location:
Holds the Complete location of Current Url.
Document.location(Document.Url);
Hope this helps,
Happy Coding.
Comments are closed.