GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Get MediaWiki
  • Get extensions
  • Tech blog
  • Contribute
  • User help
  • FAQ
  • Technical manual
  • Support desk
  • Communication
  • Developer portal
  • Code statistics
  • Community portal
  • Recent changes

This view

  • Original page
  • New address

GeezerVison is showing www.mediawiki.org — Manual:$wgExternalLinkTarget - MediaWiki

Parser: $wgExternalLinkTarget
Set a default target for external links.
Introduced in version:1.14.0 (r41333)
Removed in version:Still in use
Allowed values:(string) or false
Default value:false
Other settings: Alphabetical | By function

Details

Set a default target for external links. If set to e.g. "_blank", this will also set the "noreferrer" and "noopener" link rel to prevent the attack described at https://mathiasbynens.github.io/rel-noopener/. Some older browsers may not support these link attributes, hence setting $wgExternalLinkTarget to _blank may represent a security risk to some of your users.

Add the following entry to LocalSettings.php file in order to open external links in a new window / tab.

$wgExternalLinkTarget = '_blank';

If the value is set to false, then no target attribute is used with external links (This behavior is the same as _self).

When changing the value, page cache must be refreshed in order to make the setting effective.

See also

  • Manual:Hooks/LinkerMakeExternalLink
  • $wgNoFollowLinks
  • Extension:LinkTarget
  • Snippets/Open external links in new window
  • Snippets/Open external sidebar links in new window
  • Snippets/Open specific external links in new window
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:$wgExternalLinkTarget&oldid=8033945"
Categories:
  • MediaWiki configuration settings
  • MediaWiki configuration settings introduced in version 1.14.0
  • MediaWiki configuration settings still in use
  • Parser variables
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.