You are browsing a read-only backup copy of Wikitech. The live site can be found at


From Wikitech-static
Jump to navigation Jump to search

wmf:Wikipedia Zero is short for zero-rated access to some Wikimedia sites, available from certain mobile ISPs who have partnered with the WMF. Technical information is available at wmf:Wikipedia Zero/Development and mw:Wikipedia Zero.

Code involved

  • mw:Extension:ZeroBanner - shows landing page, banner explaining the zero-rating, and warnings if the user is about to navigate to non-zero-rated content. Provides an API for zero configuration content for non-web consumers (e.g., the mobile apps).
  • mw:Extension:ZeroPortal - uses JsonConfig to store and manage Zero-related configuration data
  • mw:Extension:JsonConfig - stores JSON data in wiki pages; can be configured to use another wiki as a remote (do for wiki pages what InstantCommons does for images). Used for non-Zero-related things as well.
  • netmapper - Varnish module that tags requests based on what IP range they come from
  • - Puppet-hosted script that pulls configuration from a wiki that has JsonConfig

Partners sign up and manage IP range, messaging and other configuration via ZeroPortal (on zerowiki). syncs the IP configuration to Varnish/netmapper which add an X-CS header to zero-rated requests. ZeroBanner (installed on all Wikipedias) detects the header, fetches configuration via JsonConfig's remote repository feature from zerowiki and displays banners.

Testing changes

For local testing, see Zerobanner's README. For live testing:

  1. Visit and you are not getting zero-rating messages.
  2. Do no-op config change on zerowiki's Zero:TEST1 page. Verify zerofetch ran successfully (how?)
  3. Add your own IP to Zero:TEST1. Verify zerofetch ran successfully (how?)
  4. Wait 15 minutes.
  5. Visit and verify getting zero-rating chrome.