Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

window.name Redirect 1

« window

Summary

Gets/sets the name of the window.

Syntax

string = window.name;
window.name = string;

Example

window.name = "lab_view";

Notes

The name of the window is used primarily for setting targets for hyperlinks and forms. Windows do not need to have names.

It has also been used in some frameworks for providing cross-domain messaging (e.g., SessionVars and Dojo's dojox.io.windowName) as a more secure alternative to JSONP.

Document Tags and Contributors

 Last updated by: Sheppy,