Javascript Other Objects

In Javascript, two important object are window and document objects. But few more other useful objects are available in Javascript.

Javascript History Object

The history object specifies the previous URLs requested by the browser. The history object contains a list of strings, which are the URLs accessed by the browser.

The useful methods in history object are:

Javascript History Object Methods

Name Description
go Takes a number as an argument and load the URL corresponding to it.
back Use to move previous page URL.
forward Use to move next page URL.

There are few properties, which can be accessed in the history object.

Javascript History Object Properties:

Name Description
current This represents the current page url in the history object.
previous This represents the previous page url in the history object list, if any.
next This represents the next page url in the history object list, if any.
length This returns the number of objects in the history list.

Javascript Location Object

The location object specifies the current URL.

There are few properties, which can be accessed in the history object.

Javascript Location Object Properties

Name Description
href This represents the URL of the current page .

The location object also contains useful methods.

Javascript Location Object Methods

Name Description
reload This method forces to reload of the windows current page.
replace This method load a perticular URL replacing the current history entry.

Javascript Navigator Object

This defines the name and version of the client internet browser or web navigator program that is being used and the mime types supported by it.

It also defines a list of plug-ins available to the system.

The navigator object contains useful properties.

Javascript Navigator Object Properties

Name Description
appCodeName This specifies the code name of the browser.
appName This specifies the name of the browser.
appVersion This specifies version information for the browser.
language The languge the user is using such as "en-us".
mimeTypes An array of MIME type descriptive strings that are supported by the browser.
platform A description of the operating system platform. In my case it is "Win32" for Windows 95.
plugins An array of plugins installed in the browser.
userAgent String passed by browser as user-agent header.

The navigator object also contains useful methods

Javascript Location Object Methods

Name Description
javaEnabled This returns a boolean telling if the browser has JavaScript enabled.
taintEnabled This returns a boolean telling if the browser has tainting enabled.

See Also

Javascript Built in String Object
Javascript Built in Number Object
Javascript Built in Math Object
Javascript Built in Date Object
Javascript Built in Arrays Object
Javascript Built in Boolean Object
Javascript Built in RegExp Object
Javascript Built in JSON Object


 
SHARE THIS IF YOU LIKE!
submit to reddit
SUBSCRIBE FOR LATEST UPDATES
HAVE WE CONNECTED ON FACEBOOK?
TOP TUTORIALSTOP CODE EXAMPLESTOP LIVE DEMOLINKSSTAY CONNECTED
HTML Tutorial
HTML5 Tutorial
Bootstrap3 Tutorial
Javascript Tutorial
TypeScript Tutorial
AngularJS Tutorial
CSharp Tutorial
PHP Tutorial
Developer Tools
Javascript
AngularJS
Google MAP API V3
ASP.NET
Javascript
AngularJS
Google MAP API V3
Contact Us
Advertise with Us
Privacy Policy
Disclaimer
Stay connected. We actually like you. If you want to get up to the minute updates, then connect with us on your fav below.
 
Twitter   Linkedin   Facebook   Google+    RSS   Pinterest
 
Protected by Copyscape Original Content Checker
 
 
Copyright ©2017 www.techstrikers.com Unauthorized reproduction/replication of any part of this site is prohibited.