---
layout: api
title: "v3.3.1 JavaScript Library: Global Switches"
categories: api
version: v3.3.1
permalink: /api/v3.3.1/l-global/
---
<h2 id="global">Global Switches</h2>

<p>Global switches are created for rare cases and generally make Leaflet to not detect a particular browser feature even if it's there. You need to set the switch as a global variable to <code><span class="literal">true</span></code> <em>before</em> including Leaflet on the page, like this:</p>

<pre><code>&lt;script&gt;L_PREFER_CA