diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 21:46:22 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 21:46:22 -0500 |
commit | a065e04d529da1d847b5062a12c46d916408bf32 (patch) | |
tree | fe0f8bcec1ff39a3c499a2708222dcf15224ff70 /files/pt-br/mozilla/firefox | |
parent | 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (diff) | |
download | translated-content-a065e04d529da1d847b5062a12c46d916408bf32.tar.gz translated-content-a065e04d529da1d847b5062a12c46d916408bf32.tar.bz2 translated-content-a065e04d529da1d847b5062a12c46d916408bf32.zip |
update based on https://github.com/mdn/yari/issues/2028
Diffstat (limited to 'files/pt-br/mozilla/firefox')
13 files changed, 0 insertions, 1297 deletions
diff --git a/files/pt-br/mozilla/firefox/building_firefox_with_rust_code/index.html b/files/pt-br/mozilla/firefox/building_firefox_with_rust_code/index.html deleted file mode 100644 index 7f50b8a9c2..0000000000 --- a/files/pt-br/mozilla/firefox/building_firefox_with_rust_code/index.html +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: Building Firefox with Rust code -slug: Mozilla/Firefox/Building_Firefox_with_Rust_code -translation_of: Archive/Mozilla/Firefox/Building_Firefox_with_Rust_code ---- -<div>{{FirefoxSidebar}}</div><p>Em maio de 2015, foi lançada a primeira versão 1.0 estável da <a href="http://www.rust-lang.org/">linguagem de programação Rust</a>, e vários experimentos para escrever partes do Gecko em Rust iniciaram. Esta página é um simples guia para pessoas trabalhando nesta área.</p> - -<h2 id="Adicionando_código_Rust">Adicionando código Rust</h2> - -<p>O suporte básico para buildar códigos em Rust foi lançado no <a class="bz_bug_link - bz_status_RESOLVED bz_closed" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1161339" title="RESOLVED FIXED - Support rust files in moz.build SOURCES">bug 1161339</a>. Se você possui <em>rustc</em> no seu path, você pode adicionar arquivos .rs ao SOURCES em moz.build. Então adicione</p> - -<pre>ac_add_options --enable-rust</pre> - -<p>ao seu <a href="/en-US/docs/Configuring_Build_Options">mozconfig</a> e provavelmente funcionará.</p> - -<p>A biblioteca padrão do Rust utiliza armazenamento thread-local, que não é suportado no MacOS X 2.6, então se você está buildando em um Mac, você também precisará disso:</p> - -<pre>ac_add_options --enable-macos-target=10.7</pre> - -<p>Alternativamente, você pode compilar com um conjunto de ferramentas costumizadas com -<code>-disable-elf-tls</code>. Veja <a class="bz_bug_link - bz_status_NEW " href="https://bugzilla.mozilla.org/show_bug.cgi?id=1164109" title="NEW - rust code fails to link on macosx because of thread-local storage">bug 1164109</a> para detalhes.</p> - -<p>Graças as limitações do <em>cargo</em> e do sistema de build do Firefox, atualmente nós buildamos uma biblioteca estática stand-alone para cada arquivo rust listado em SOURCES. Você precisa portanto listar apenas os arquivos rust de alto nível. Tudo precisa ser um único <em>crate</em>, como uma compilação manual unificada. O compilador rust irá pesquisar por módulos interiores pelo nome do arquivo-fonte, mas referências <em>crate</em> externas não serão resolvidas.</p> - -<p>Veja o <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1135640">bug 1135640</a> ('oxidation') para monitoramento global.</p> - -<h2 id="Testando_código_Rust">Testando código Rust</h2> - -<p>There's a simple linkage teste unitários in the tree. Você pode utilizá-lo para verificar se Rust está habilitado e funcionando com your build setup.</p> - -<pre>./mach gtest rust.*</pre> - -<p>Look for the <strong>rust.CallFromCpp</strong> test to pass, along with any others.</p> diff --git a/files/pt-br/mozilla/firefox/developer_edition/index.html b/files/pt-br/mozilla/firefox/developer_edition/index.html deleted file mode 100644 index 5ae8204f4c..0000000000 --- a/files/pt-br/mozilla/firefox/developer_edition/index.html +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: Edição do Programador -slug: Mozilla/Firefox/Developer_Edition -tags: - - Firefox - - Iniciante - - Landing -translation_of: Mozilla/Firefox/Developer_Edition ---- -<div>{{FirefoxSidebar}}</div> - -<p style="text-align: center;"><img alt="" src="https://mdn.mozillademos.org/files/9143/firefox-dev-ed_logo-only_1024.png" style="display: block; height: 256px; margin-left: auto; margin-right: auto; width: 256px;">Uma versão do Firefox sob medida para desenvolvedores web.</p> - -<p><a href="https://www.mozilla.org/pt-BR/firefox/developer/" style="width: 250px; display: block; margin-left: auto; margin-right: auto; padding: 10px; text-align: center; border-radius: 4px; background-color: #81BC2E; white-space: nowrap; color: white; text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.25); box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.2), 0px -1px 0px 0px rgba(0, 0, 0, 0.3) inset;">Download Firefox Developer Edition</a></p> - -<hr> -<div class="column-container"> -<div class="column-half"> -<h3 id="Os_recursos_mais_recentes_do_Firefox"><strong>Os recursos mais recentes do Firefox</strong></h3> - -<p>O Firefox Developer Edition substitui o canal Aurora no <a href="https://wiki.mozilla.org/Release_Management/Release_Process">Processo de lançamento do Firefox</a>. Como no Aurora, os recursos vão para o Developer Edition a cada seis semanas, depois de serem estabilizados no Nightly builds.</p> - -<p>Ao usar o Developer Edition, você ganha acesso a ferramentas e recursos da plataforma pelo menos 12 semanas antes de chegar ao principal canal de lançamento do Firefox.</p> - -<p><a href="/en-US/Firefox/Releases/69">Descubra o que há de novo na Edição do Programador.</a></p> -</div> - -<div class="column-half"> -<h3 id="Um_tema_distinto"><strong>Um tema distinto</strong></h3> - -<p>Incluindo acesso mais rápido às ferramentas de desenvolvimento.</p> - -<h3 id="Ferramentas_de_desenvolvimento_experimentais"><strong>Ferramentas de desenvolvimento experimentais</strong></h3> - -<p><span id="result_box" lang="pt"><span>Vamos</span> <span>incluir ferramentas</span> <span>experimentais</span> <span>que ainda não</span> <span class="alt-edited">estão prontas para liberação</span><span>.</span></span></p> - -<p>Por exemplo, o Developer Edition inclui o <a href="/en-US/docs/Tools/Valence">Valence add-on</a>, <span class="short_text" id="result_box" lang="pt"><span>que permite que você</span> <span>conecte o</span></span> <a href="/en-US/docs/Tools">Firefox developer tools</a> a<span id="result_box" lang="pt"> <span>outros navegadores como o</span> <span>Chrome</span> <span>no Android e</span> o <span>Safari</span> <span>no iOS</span></span>.</p> -</div> -</div> - -<div class="column-container"> -<div class="column-half"> -<h3 id="Um_perfil_separado"><strong>Um perfil separado</strong></h3> - -<p>Firefox Developer Edition utiliza um perfil separado de outras versões do Firefox instalado em sua máquina. Isto significa que você pode facilmente executar o Developer Edition ao lado de seu lançamento ou versão beta do Firefox.</p> - -<div class="note"> -<p><strong>Note:</strong> <span id="result_box" lang="pt"><span>Isto significa que a</span> <span>primeira vez que você</span> <span>iniciar o</span> <span>Developer Edition</span><span>, você verá</span> <span>um navegador</span> <span>completamente</span> <span class="alt-edited">não personalizado</span><span>,</span> <span>sem complementos</span><span>, bookmarks</span> <span>ou histórico</span></span>. Você pode <a href="https://support.mozilla.org/en-US/kb/how-do-i-set-up-firefox-sync">usar Firefox Sync</a> <span id="result_box" lang="pt"><span>se você quer</span> <span>unificar</span> <span>suas</span> <span>configurações entre o</span> <span>Developer Edition</span> <span>e</span> <span>outras edições do</span> <span>Firefox</span></span>.</p> -</div> -</div> - -<div class="column-half"> -<h3 id="Set_up_para_desenvolvedores_web"><strong>Set up para desenvolvedores web</strong></h3> - -<p>Nós definimos valores de preferência padrões adaptados para desenvolvedores web. Por exemplo, {{glossary("Chrome")}} e depuração remota são ativadas por padrão.</p> -</div> -</div> diff --git a/files/pt-br/mozilla/firefox/developer_edition/revertendo/index.html b/files/pt-br/mozilla/firefox/developer_edition/revertendo/index.html deleted file mode 100644 index de8ce406d8..0000000000 --- a/files/pt-br/mozilla/firefox/developer_edition/revertendo/index.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Revertendo -slug: Mozilla/Firefox/Developer_Edition/Revertendo -translation_of: Mozilla/Firefox/Developer_Edition/Reverting ---- -<div>{{FirefoxSidebar}}</div><h2 id="Revertendo_tema_no_Developer_Edition">Revertendo tema no Developer Edition</h2> - -<p><br> - Se você quiser usar o Developer Edition, mas prefere usar o tema 'Australis' usado no Firefox e Firefox Beta, você poderá alternar para o tema normal do Firefox: basta abrir o painel "Personalizar", clicar em "Temas", e selecionar o tema rotulado como "Padrão":</p> - -<p>{{EmbedYouTube("oiHt8T1Liyk")}}</p> - -<p>Alternativamente, digite "about:addons" na barra de localização, selecione "Aparência", e alterne os temas.</p> - -<h2 id="Revertendo_para_Firefox_Aurora">Revertendo para Firefox Aurora</h2> - -<p><br> - Se você quiser todos os recursos pré-Beta do Firefox Developer Edition, mas não quer nenhuma outra alteração, você pode reverter para algo como o antigo Firefox Aurora. Isso também irá restaurar seu perfil de pré-atualização e os dados da sessão. Este é um processo de 2 etapas, e você precisa seguir os passos nesta ordem:</p> - -<ol> - <li>Abra a página de Preferências do Developer Edition, e desmarque a opção "Permitir que o Firefox Developer Edition e Firefox execute ao mesmo tempo". Será solicitado a reinicialização do navegador.</li> - <li>Depois de reinicializar, você poderá reverter o tema do developer edition como descrito em "Revertendo tema no Developer Edition" acima.</li> -</ol> - -<p>{{EmbedYouTube("8rEJn_hATE8")}}</p> diff --git a/files/pt-br/mozilla/firefox/multiple_profiles/index.html b/files/pt-br/mozilla/firefox/multiple_profiles/index.html deleted file mode 100644 index 54bdf6b45a..0000000000 --- a/files/pt-br/mozilla/firefox/multiple_profiles/index.html +++ /dev/null @@ -1,244 +0,0 @@ ---- -title: Vários perfis no Firefox -slug: Mozilla/Firefox/Multiple_profiles -tags: - - Firefox - - Guía - - Iniciante - - Intro - - Perfis - - QA -translation_of: Mozilla/Firefox/Multiple_profiles ---- -<div>{{FirefoxSidebar}}</div> - -<p class="summary">Um perfil no Firefox é a coleção de configurações, personalizações, complementos e outras personalizações que um usuário fez ou instalou em sua cópia do Firefox. Você pode encontrar <a href="https://support.mozilla.org/kb/Profiles">detalhes sobre perfis</a> no site de suporte ao usuário final da Mozilla.</p> - -<h2 id="Motivos_para_ter_vários_perfis">Motivos para ter vários perfis</h2> - -<p>O usuário casual pode querer ter perfis diferentes para trabalho e uso pessoal ou para membros da família diferentes. Ter perfis diferentes ajudaria a separar a vida profissional e pessoal ou permitir que cada membro da família tenha seu próprio conjunto de favoritos, configurações e complementos.</p> - -<p>Os desenvolvedores web podem querer um perfil secundário para testar sites, aplicativos ou outros projetos em diferentes canais do Firefox. Por exemplo, você pode querer ter algumas extensões instaladas para desenvolvimento Web, mas não para navegação na Web de propósito geral. Ao usar o canal Nightly, você pode encontrar alguns complementos que se tornaram temporariamente incompatíveis com novas alterações da API, até que o desenvolvedor do complemento tenha a chance de atualizá-los. Você pode remover esses complementos do seu perfil para uso noturno, mantendo-os para uso com outros perfis.</p> - -<p>Para colaboradores de QA, teste e triagem de bugs, você pode querer ter várias versões de desenvolvimento do Firefox instaladas, cada uma com seu próprio perfil. Criar novos perfis para testes pode impedir que você perca suas preferências, favoritos e histórico. Demora pouco tempo para configurar um novo perfil e, uma vez concluído, todas as suas versões do Firefox serão atualizadas separadamente e poderão ser executadas simultaneamente.</p> - -<h2 id="Canais_disponíveis_de_desenvolvimento_do_navegador">Canais disponíveis de desenvolvimento do navegador</h2> - -<p>Há quatro canais do navegador disponíveis, cada um em um nível diferente de estabilidade e desenvolvimento. Os quatro canais são <a href="https://www.mozilla.org/firefox/new//en-US/docs/">Release</a>, <a href="https://www.mozilla.org/firefox/beta//en-US/docs/">Beta</a>, <a href="https://www.mozilla.org/firefox/aurora/">Developer Edition</a> e <a href="https://nightly.mozilla.org/">Nightly</a>. O canal Release é recomendado para a maioria dos usuários, já que é o canal de "lançamento oficial". No entanto, para os mais aventureiros, você pode experimentar um dos outros três canais para ver o que está por vir no Firefox e brincar com recursos emergentes. O canal Beta contém os recursos que devem estar na próxima versão do Firefox e estão em fase final de testes. Aurora contém recursos experimentais, que ainda não são de qualidade beta. Nightly contém o código mais recente dos desenvolvedores do Firefox e é o canal menos estável.</p> - -<h2 id="Ferramentas_de_terceiros">Ferramentas de terceiros</h2> - -<p>Além do Gerenciador de Perfis integrado e do Gerenciador de Perfis externo, existem algumas ferramentas de terceiros que facilitam o trabalho com vários perfis.</p> - -<div class="note"> -<p>Essa lista não é exaustiva. Por favor, adicione a esta lista quaisquer ferramentas úteis que você descobrir!</p> -</div> - -<h3 id="Mac_OS_X">Mac OS X</h3> - -<ul> - <li><a href="http://davemartorana.com/multifirefox/">Multifirefox</a> por Dave Martorana</li> -</ul> - -<h2 id="Gerenciamento_de_perfis">Gerenciamento de perfis</h2> - -<h3 id="Determinando_o_perfil_enquanto_o_Firefox_está_em_execução">Determinando o perfil enquanto o Firefox está em execução</h3> - -<p>Para determinar o perfil de uma instância do Firefox em execução no Windows, macOS ou Linux,</p> - -<ol> - <li>Digite about:profiles ma barra de pesquisa de URL do navegador.</li> - <li>A página apresenta uma lista de todos os seus perfis, cada um começando com "Perfil: " seguido por seu nome.</li> - <li>O que está sendo usado por esta instância do Firefox incluirá o texto em negrito "<strong>Este é o perfil em uso</strong>". Por exemplo, se você encontrar este texto sob a entrada de "Perfil: Suzie", então você está usando um perfile chamado <em>Suzie</em>.</li> -</ol> - -<h3 id="Iniciando_o_Firefox_no_perfil_desejado">Iniciando o Firefox no perfil desejado</h3> - -<p id="You_cannot_change_the_profile_while_Firefox_is_running._Although_it_is_possible_in_some_cases_to_have_multiple_instances_of_Firefox_running_in_different_profiles_to_avoid_confusion_you_should_first_exitquitterminate_all_running_instances_of_Firefox_FirefoxDeveloperEdition_or_Nightly._Then_follow_the_instructions_below_applicable_to_your_operating_system."><strong>Você não pode mudar o perfile enquanto o Firefox está em execução.</strong> Apesar de ser possível em alguns casos ter várias instâncias do Firefox em execução em diferentes perfis, para evitar confusão, você deve primeiro sair/terminar todas as instâncias em execução de <em>Firefox</em>, <em>FirefoxDeveloperEdition</em> ou <em>Nightly</em>. Então, siga as instruções abaixo, aplicáveis ao seu sistema operacional.</p> - -<h4 id="Windows">Windows</h4> - -<h5 id="Windows_XP">Windows XP</h5> - -<ol> - <li>Clique no botão de Iniciar.</li> - <li>Clique "Executar".</li> - <li> - <p>Digite <code>firefox --ProfileManager</code>.</p> - </li> -</ol> - -<h5 id="Windows_Vista7">Windows Vista/7</h5> - -<ol> - <li>Clique no botão de Iniciar.</li> - <li>Clique na barra de pesquisa na parte inferior.</li> - <li> - <p>Digite <code>firefox --ProfileManager</code>.</p> - </li> -</ol> - -<h5 id="Windows_88.1">Windows 8/8.1</h5> - -<ol> - <li>Pressione "Windows + R" em seu teclado.</li> - <li>Digite <code>firefox --ProfileManager</code>.</li> -</ol> - -<p>Se a janela do Gerenciador de Perfis não abrir, o Firefox pode estar sendo executado em segundo plano, mesmo que não esteja visível. Feche todas as instâncias do Firefox ou reinicie o computador e tente novamente.</p> - -<h4 id="Linux">Linux</h4> - -<p>Se o Firefox já estiver incluído na sua distribuição Linux, ou se você tiver instalado o Firefox com o gerenciador de pacotes da sua distribuição Linux:</p> - -<ol> - <li>No topo da janela do Firefox, clique no menu Arquivo e selecione Sair.</li> - <li>No Terminal, execute <code>firefox --ProfileManager</code></li> -</ol> - -<p>Se a janela do Gerenciador de Perfis não abrir, o Firefox pode estar sendo executado em segundo plano, mesmo que não esteja visível. Feche todas as instâncias do Firefox ou reinicie o computador e tente novamente.</p> - -<h4 id="macOS">macOS</h4> - -<ol> - <li>Execute o aplicativo <em>Terminal</em>, que é encontrado em Aplicativos/Utilitários.</li> - <li>Digite ou cole no caminho para o Firefox, seguido por <code>.app/Contents/MacOS/firefox</code>. Por exemplo, se o Firefox está instalado no local recomendado, você digitaria <code>/Applications/Firefox.app/Contents/MacOS/firefox</code>.</li> - <li>Se você tiver o caminho para o seu perfil desejado à mão, insira um caractere de espaço, seguido por <code>-profile</code> seguido por outro caractere de espaço, seguido pelo caminho completo para a pasta de perfil na qual você deseja iniciar. Isto irá iniciar o Firefox imediatamente. Caso contrário, insira um caractere de espaço seguido de <code>--profilemanager</code>. Isso apresentará a janela do Gerenciador de Perfis na qual você pode fazer sua seleção.</li> - <li>Pressione <em>enter.</em></li> -</ol> - -<p>Aqui está um exemplo completo do comando Terminal a partir dos passos 2-3:</p> - -<pre>/Applications/Firefox.app/Contents/macOS/firefox -profile /Users/Suzie/Library/Application\ Support/Firefox/Profiles/r99d1z7c.default</pre> - -<p>Se você quiser fazer isso com frequência e de forma mais fácil, você pode querer criar um aplicativo <em>Automatizador</em>, como explicado <a href="http://sonnygill.net/mac/mac-multiple-firefox-profiles/">neste tutorial</a>.</p> - -<h3 id="Criando_um_perfil">Criando um perfil</h3> - -<h4 id="Criando_um_perfil_através_do_Gerenciador_de_Perfis">Criando um perfil através do Gerenciador de Perfis</h4> - -<p>Essas instruções devem ser as mesmas para todos os sistemas operacionais.</p> - -<ol> - <li>Para iniciar o Assistente de novo perfil, clique em "Novo perfil..." no Gerenciador de Perfis.</li> - <li>Clique em Próximo e insira o nome do perfil. Use um nome de perfil que seja descritivo, como seu nome pessoal. Este nome não é exposto à Internet.</li> - <li>Você também pode escolher onde armazenar o perfil no seu computador. Para selecionar o local de armazenamento, clique em Pasta....</li> - <li>Se você escolher o local da pasta para o perfil, selecione uma pasta nova ou vazia. Se você escolher uma pasta que não esteja vazia e depois remover o perfil e escolher a opção \"Excluir arquivos\", tudo dentro dessa pasta será excluído.</li> - <li>Para criar o novo perfil, clique Concluir.</li> -</ol> - -<h4 id="Criando_um_perfil_através_do_navegador_Firefox">Criando um perfil através do navegador Firefox</h4> - -<p>Você pode criar um novo perfil do Firefox diretamente no navegador.</p> - -<ol> - <li>Digite about:profiles na barra de pesquisa de URL do navegador</li> - <li>Na página, clique no botão Criar um novo perfil</li> - <li>Leia a introdução e clique em Próximo</li> - <li>Digite um nome de perfil para seu novo Perfil. Use um nome de perfil que é descritivo, tal como seu nome pessoal. Esse nome não é exposto para a Internet.</li> - <li>Opcionalmente, para alterar onde o perfil armazenará seu computador, clique em Pasta...</li> - <li>Para criar um novo perfil, clique Concluir.</li> -</ol> - -<h3 id="Excluindo_um_perfil">Excluindo um perfil</h3> - -<ol> - <li>No Gerenciador de perfil, selecione o perfil para remover e clique Excluir perfil....</li> - <li>Confirme que você deseja excluir o perfil: - <ul> - <li>"Não excluir arquivos" remove o perfil do Gerenciador de perfil, mas retém os arquivos de dados do perfil no seu computador na pasta de armazenamento, para que suas informações não sejam perdidas. "Não excluir arquivos" é a opção preferida, porque salva a pasta do perfil antigo, permitindo recuperar os arquivos para um novo perfil.</li> - <li>"Excluir arquivos" remove o perfil e seus arquivos, incluindo os favoritos, configurações, senhas, etc.<br> - <br> - {{ warning("Se você usar a opção \"Excluir arquivos\", a pasta de perfil e os arquivos serão excluídos. Essa ação não podem ser desfeitas.") }}</li> - <li>"Cancelar" interrompe a exclusão de perfil.</li> - </ul> - </li> -</ol> - -<h3 id="Renomeando_um_perfil">Renomeando um perfil</h3> - -<ol> - <li>No Gerenciador de perfil, selecione o perfil que você deseja renomear e clique em "Renomear perfil".</li> - <li>Insira um novo nome para o perfile e clique em OK.</li> -</ol> - -<div class="note"> -<p>Nota: A pasta contendo os arquivos para o perfil não é renomeada.</p> -</div> - -<h2 id="Opções">Opções</h2> - -<h3 id="Trabalhar_desconectado">Trabalhar desconectado</h3> - -<p>A escolha desta opção carrega o perfil selecionado e inicia o Firefox desconectado. Você pode visualizar páginas web visualizadas anteriormente e experimentar seu perfil.</p> - -<h3 id="Não_perguntar_na_inicialização">Não perguntar na inicialização</h3> - -<p>Se você tiver vários perfis, o Firefox solicitará que o perfil seja usado toda vez que você iniciar o Firefox. Selecione essa opção para permitir que o Firefox carregue o perfil selecionado, sem solicitar a inicialização.</p> - -<div class="note"> -<p>Nota: Para acessar outros perfis após selecionar esta opção, você deve iniciar o Gerenciador de perfis primeiro.</p> -</div> - -<h2 id="Usando_os_perfis">Usando os perfis</h2> - -<h3 id="Windows_2">Windows</h3> - -<p>Se você deseja que o gerenciador de perfil seja exibido toda vez que iniciar o Firefox, para poder escolher um perfil, será necessário editar o "Destino" do ícone de inicialização. Para fazer isso:</p> - -<ol> - <li>Clique com o botão direito o ícone e escolha "Propriedades".</li> - <li>Quando a caixa de diálogo de propriedades for exibida, você verá um campo de texto "Destino" que poderá editar e deverá mostrar o caminho atual do arquivo.</li> - <li>Após fechar as aspas, adicione <code>-ProfileManager</code>.</li> - <li>Clique Ok.</li> -</ol> - -<p>Agora, sempre que você clicar duas vezes nesse ícone, o Gerenciador de perfis deverá aparecer, permitindo que você escolha o perfil que deseja usar.</p> - -<p>Se você quiser que ícones individuais iniciem perfis específicos, será necessário editar o "Destino" de cada ícone. Para fazer isso:</p> - -<ol> - <li>Clique com botão direito no ícone e escolha "Propriedades".</li> - <li>Quando a caixa de diálogo de propriedades for exibida, você verá um campo de texto "Destino" que poderá editar e deverá mostrar o caminho atual do arquivo.</li> - <li>Para definir permanentemente um perfil específico, adicione <code>-p NOME_DO_PERFIL</code> ao caminho de destino, mas fora das aspas, substituindo "NOME_DO_PERFIL" com o nome de perfil que você escolher.</li> - <li>Se você também quiser permitir que várias instâncias do Firefox sejam executadas ao mesmo tempo, adicione <code>-no-remote</code> após o nome do perfil.</li> - <li>Quando terminar, clique em Ok. Faça isso para cada ícone para o qual você gostaria de ter um perfil específico. Uma vez feito, cada um deve iniciar automaticamente com o perfil especificado.</li> -</ol> - -<h3 id="Linux_2">Linux</h3> - -<p>Não existe uma maneira extremamente direta de criar lançadores de aplicativos personalizados no Gnome 3 como havia no Gnome 2. O tutorial a seguir ajudará você a progredir no geral: <a href="https://blog.randell.ph/how-to-create-custom-application-launchers-in-gnome-3/">Gnome 3 Iniciador de aplicativos personalizado</a>. Depois de chegar ao ponto de adicionar um novo item, você pode ter a caixa de diálogo de perfil sempre exibida ou definir o inicializador para iniciar um perfil específico.</p> - -<p>Se você deseja que o gerenciador de perfil seja exibido toda vez que iniciar o Firefox, para poder escolher um perfil, será necessário definir a linha de comando para o seu novo iniciador.</p> - -<ol> - <li>Defina o campo de texto "command" para direcionar o arquivo executável, provavelmente "/usr/bin/firefox", e adicione o parâmetro <code>-p</code>.</li> -</ol> - -<p>Se você quiser que ícones individuais iniciem perfis específicos, você precisará definir a linha de comando para o seu novo lançador. Para fazer isso:</p> - -<ol> - <li>Defina o campo de texto "command" para direcionar o arquivo executável, provavelmente "/usr/bin/firefox", e adicione o parâmetro <code>-p NOME_DO_PERFIL</code>, substituindo "NOME_DO_PERFIL" com o perfil específico.</li> - <li>Repita conforme necessário, para cada perfil adicional que você deseja definir.</li> - <li>Se você também quiser permitir que várias instâncias do Firefox sejam executadas ao mesmo tempo, adicione "-no-remote" após o nome do perfil.</li> -</ol> - -<h3 id="Mac_OS_X_2">Mac OS X</h3> - -<p>Você pode encontrar um tutorial útil para configurar lançadores personalizados aqui: <a href="https://spf13.com/post/managing-multiple-firefox-profiles-in-os-x/">Gerenciando vários perfis do Firefox no OSX</a>. Observe que é melhor seguir todas as etapas na seção "Criando os scripts", incluindo a etapa "editar Info.plist". Deixe de fora o nome do perfil se quiser que o seletor de perfis seja exibido toda vez que você iniciar.</p> - -<h2 id="Configurando_vários_perfis_para_diferentes_canais_do_Firefox">Configurando vários perfis para diferentes canais do Firefox</h2> - -<p>Esta seção será especialmente útil se você for um desenvolvedor, quiser trabalhar com vários canais e cada um tiver seu iniciador separado.</p> - -<h3 id="Windows_3">Windows</h3> - -<p>No Windows, as compilações Developer e Nightly têm seu próprio diretório na pasta "Programas", para que você não precise se preocupar com onde armazenar os arquivos baixados. No entanto, todos os três tentarão usar o mesmo perfil por padrão. Você não vai querer manter esse comportamento, porque os diferentes canais têm diferentes níveis de recursos. Para definir cada ativador, siga as instruções do Windows no <a href="#Windows">Windows Launcher</a>.</p> - -<h3 id="Linux_3">Linux</h3> - -<p>No Linux, as coisas não são configuradas automaticamente. Você provavelmente obterá uma solicitação para fazer o download de um arquivo tar.bz2 para extrair. Extraia os arquivos para um novo diretório e use as instruções do novo lançador aqui. A única mudança que você precisará fazer é o caminho do comando. Você desejará configurá-lo para o diretório em que extraiu o arquivo tar.bz2 do canal Firefox e o arquivo executável "firefox" localizado nesse diretório. Os demais métodos de atribuição de perfil permanecerão os mesmos. Você desejará, com certeza, adicionar a parte <code>-no-remote</code> ao final do campo de comando, para poder executar várias instâncias ao mesmo tempo.</p> - -<h3 id="Mac_OS_X_3">Mac OS X</h3> - -<p>Você pode encontrar um tutorial útil para configurar lançadores personalizados aqui: <a href="https://spf13.com/post/managing-multiple-firefox-profiles-in-os-x/">Gerenciando vários perfis do Firefox no OSX</a>. Observe que é melhor seguir todas as etapas na seção "Criando os scripts", incluindo a etapa "editar Info.plist". Além disso, você desejará alterar o caminho no script do shell para apontar para o arquivo .app correto para o canal do Firefox que você deseja segmentar.</p> diff --git a/files/pt-br/mozilla/firefox/multiprocess_firefox/index.html b/files/pt-br/mozilla/firefox/multiprocess_firefox/index.html deleted file mode 100644 index 2dd2134e60..0000000000 --- a/files/pt-br/mozilla/firefox/multiprocess_firefox/index.html +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: Multiprocess Firefox -slug: Mozilla/Firefox/Multiprocess_Firefox -tags: - - Português (do Brasil) tags -translation_of: Mozilla/Firefox/Multiprocess_Firefox ---- -<div>{{FirefoxSidebar}}</div><p>In current versions of desktop Firefox, the entire browser runs in a single operating system process. In particular, the JavaScript that runs the browser UI (also known as "chrome code") runs in the same process as the code in web pages (also known as "content" or "web content").<br> - <br> - Future versions of Firefox will run the browser UI in a separate process from web content. In the first iteration of this architecture all browser tabs will run in the same process, and the browser UI will run in a different process. In future iterations, we expect every browser tab to run in its own process. The project that's delivering multiprocess Firefox is called Electrolysis, sometimes abbreviated to e10s.</p> - -<p>Normal web pages are unaffected by multiprocess Firefox. People working on Firefox itself and Firefox add-on developers will be affected if their code relies on being able to access web content directly.</p> - -<p>Instead of accessing content directly, chrome JavaScript will have to use the <a href="/en-US/Firefox/Multiprocess_Firefox/The_message_manager">message manager</a> to access content. To help ease the transition we've implemented <a href="/en-US/Firefox/Multiprocess_Firefox/Cross_Process_Object_Wrappers">Cross Process Object Wrappers</a> and some <a href="/en-US/Firefox/Multiprocess_Firefox/Limitations_of_chrome_scripts#Compatibility_shims">compatibility shims for add-on developers</a>. If you're an add-on developer wondering whether you are affected, see the <a href="/en-US/Add-ons/Working_with_multiprocess_Firefox">guide to working with multiprocess Firefox</a>.</p> - -<p>Multiprocess Firefox is currently enabled by default in <a class="external external-icon" href="https://nightly.mozilla.org/">Nightly</a> builds. As a visual indicator that you're running multiprocess Firefox, the titles of remote tabs are underlined.</p> - -<hr> -<div class="column-container"> -<div class="column-half"> -<dl> - <dt><a href="/en-US/Firefox/Multiprocess_Firefox/Technical_overview">Technical overview</a></dt> - <dd>A very high-level view of how multiprocess Firefox is implemented.</dd> - <dt><a href="/en-US/Firefox/Multiprocess_Firefox/Glossary">Glossary</a></dt> - <dd>A reference for the jargon used in multiprocess Firefox.</dd> - <dt><a href="/en-US/Firefox/Multiprocess_Firefox/The_message_manager">The message manager</a></dt> - <dd>How to communicate between chrome and content.</dd> - <dt><a href="/en-US/Firefox/Multiprocess_Firefox/Message_Manager_Interfaces">Message Manager interfaces</a></dt> - <dd>Includes links to the API reference for the message manager interfaces.</dd> - <dt><a href="/en-US/Firefox/Multiprocess_Firefox/Frame_script_environment">Frame script environment</a></dt> - <dd>The environment frame scripts run in, and especially how it differs from the environment for chrome code.</dd> -</dl> -</div> - -<div class="column-half"> -<dl> - <dt><a href="/en-US/Firefox/Multiprocess_Firefox/Motivation">Motivation</a></dt> - <dd>Why we're implementing multiprocess Firefox: performance, security, and stability.</dd> - <dt><a href="/en-US/Add-ons/Working_with_multiprocess_Firefox">Add-on migration guide</a></dt> - <dd>If you're an add-on developer, find out if you're affected and how to update your code.</dd> - <dt><a href="/en-US/Firefox/Multiprocess_Firefox/Cross_Process_Object_Wrappers">Cross Process Object Wrappers</a></dt> - <dd>Cross Process Object Wrappers are a migration aid, giving chrome code synchronous access to content.</dd> - <dt><a href="/en-US/Firefox/Multiprocess_Firefox/Debugging_frame_scripts">Debugging frame scripts</a></dt> - <dd>Using the Browser Content Toolbox to debug frame scripts.</dd> -</dl> -</div> -</div> - -<hr> -<div class="column-container"> -<div class="column-half"> -<dl> - <dt><a href="/en-US/Firefox/Multiprocess_Firefox/Limitations_of_chrome_scripts">Limitations of chrome scripts</a></dt> - <dd>Practices that will no longer work in chrome code, and how to fix them.</dd> -</dl> -</div> - -<div class="column-half"> -<dl> - <dt><a href="/en-US/Firefox/Multiprocess_Firefox/Limitations_of_frame_scripts">Limitations of frame scripts</a></dt> - <dd>Practices that will not work inside frame scripts, and what to do instead.</dd> -</dl> -</div> -</div> - -<hr> -<h2 id="Contact_us">Contact us</h2> - -<p>Find out more about the project, get involved, or ask us your questions.</p> - -<ul> - <li><strong>Electrolysis project page</strong>: <a href="https://wiki.mozilla.org/Electrolysis">https://wiki.mozilla.org/Electrolysis</a></li> - <li><strong>IRC</strong>: #e10s on <a href="https://wiki.mozilla.org/IRC">irc.mozilla.org</a></li> - <li><strong>Mailing list</strong>: <a href="https://groups.google.com/forum/#!forum/mozilla.dev.tech.electrolysis">dev.tech.electrolysis</a></li> -</ul> diff --git a/files/pt-br/mozilla/firefox/multiprocess_firefox/motivacao/index.html b/files/pt-br/mozilla/firefox/multiprocess_firefox/motivacao/index.html deleted file mode 100644 index 8b3745c16c..0000000000 --- a/files/pt-br/mozilla/firefox/multiprocess_firefox/motivacao/index.html +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Motivação para o Multiprocesso do Firefox -slug: Mozilla/Firefox/Multiprocess_Firefox/Motivacao -translation_of: Mozilla/Firefox/Multiprocess_Firefox/Motivation ---- -<div>{{FirefoxSidebar}}</div><p>Existem três principais razões para fazer o Firefox executar conteúdo em processos separados: desempenho, segurança e estabilidade.</p> - -<h2 id="Performance">Performance</h2> - -<p>A maioria dos trabalhos de performances na Mozilla nos últimos dois anos tem se concentrado na capacidade de resposta do navegador. O objetivo é reduzir "<a href="/en-US/docs/Glossary/Jank"> jank</a>" - esses momentos em que o navegador parece congelar brevemente ao carregar uma página grande, digitando uma forma, Ou rolagem. A capacidade de resposta tende a importar muito mais do que o rendimento na web hoje. Grande parte deste trabalho foi feito como parte do <a href="https://wiki.mozilla.org/Performance/Snappy"> projeto Snappy</a>. Os principais focos foram:</p> - -<ul> - <li>Moving long-running actions to a separate thread so that the main thread can continue to respond to the user.</li> - <li>Doing I/O asynchronously or on other threads so that the main thread isn’t blocked waiting for the disk.</li> - <li>Breaking long-running code into shorter pieces and running the event loop in between. Incremental garbage collection is an example of this.</li> -</ul> - -<p>Much of the low-hanging fruit in these areas has already been picked. The remaining issues are difficult to fix. For example, JavaScript execution and layout happen on the main thread, and they block the event loop. Running these components on a separate thread is difficult because they access data, like the DOM, that are not thread-safe. As an alternative, we’ve considered allowing the event loop to run in the middle of JavaScript execution, but doing so would break a lot of assumptions made by other parts of Firefox (not to mention add-ons).</p> - -<p>Running web content in a separate process is a nice alternative to these approaches. Like the threaded approach, Firefox is able to run its event loop while JavaScript and layout are running in a content process. But unlike threading, the UI code has no access to content DOM or or other content data structures, so there is no need for locking or thread-safety. The downside, of course, is that any code in the Firefox UI process that needs to access content data must do so explicitly through message passing.</p> - -<p>We feel this tradeoff makes sense for a few reasons:</p> - -<ul> - <li>It’s not all that common for Firefox code to access content DOM.</li> - <li>Code that is shared with Firefox OS already uses message passing.</li> - <li>In the multiprocess model, Firefox code that fails to use message passing to access content will fail in an obvious, consistent way. In the threaded model, code that accesses content without proper locking will fail in subtle ways that are difficult to debug.</li> -</ul> - -<h2 id="Security">Security</h2> - -<p>Right now, if someone discovers an exploitable bug in Firefox, they’re able to take over users’ computers. There are a lot of techniques to mitigate this problem, but one of the most powerful is <a href="http://en.wikipedia.org/wiki/Sandbox_%28computer_security%29">sandboxing</a>. Technically, sandboxing doesn’t require multiple processes. However, a sandbox that covered single-process Firefox wouldn’t be very useful. Sandboxes are only able to prevent processes from performing actions that a well-behaved process would never do. Unfortunately, a well-behaved Firefox process (especially one with add-ons installed) needs access to much of the network and file system. Consequently, a sandbox for single-process Firefox couldn’t restrict much.</p> - -<p>In multiprocess Firefox, content processes will be sandboxed. A well-behaved content process won’t access the filesystem directly; it will have to ask the main process to perform the request. At that time, the main process can verify that the request is safe and that it makes sense. Consequently, the sandbox for content processes can be quite restrictive. Our hope is that this arrangement will make it much harder to craft exploitable security holes for Firefox.</p> - -<h2 id="Stability">Stability</h2> - -<p>Currently, a crash in the code running a web page will take down the entire browser. With multiprocess Firefox, only the content process that crashed will be killed.</p> - -<div class="note"> -<p>This page incorporates a lot of content from Bill McCloskey's blog post on multiprocess Firefox: <a href="http://billmccloskey.wordpress.com/2013/12/05/multiprocess-firefox/">http://billmccloskey.wordpress.com/2013/12/05/multiprocess-firefox/</a></p> -</div> - -<p> </p> diff --git a/files/pt-br/mozilla/firefox/multiprocess_firefox/which_uris_load_where/index.html b/files/pt-br/mozilla/firefox/multiprocess_firefox/which_uris_load_where/index.html deleted file mode 100644 index 708c6b49f0..0000000000 --- a/files/pt-br/mozilla/firefox/multiprocess_firefox/which_uris_load_where/index.html +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: Aonde cada URI carrega -slug: Mozilla/Firefox/Multiprocess_Firefox/Which_URIs_load_where -translation_of: Mozilla/Firefox/Multiprocess_Firefox/Which_URIs_load_where ---- -<div>{{FirefoxSidebar}}</div><p>Com base inicialmente no esquema URI da página, o navegador pode decidir se carregar uma página no processo chrome ou um processo de conteúdo. Para alguns esquemas, você pode alterar o comportamento padrão.</p> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Esquema</th> - <th scope="col">Comportamento</th> - </tr> - </thead> - <tbody> - <tr> - <td><code>about:</code></td> - <td> - <p>Por padrão, as páginas <code> about: </code> são sempre carregadas no processo chrome. No entanto, quando você registra uma nova página <code> about:</code> você pode alterar esse padrão.</p> - - <p>Duas novas flags são definidas em <code><a href="https://dxr.mozilla.org/mozilla-central/source/netwerk/protocol/about/nsIAboutModule.idl">nsIAboutModule</a></code>:</p> - - <ul> - <li><code>URI_CAN_LOAD_IN_CHILD</code>: A página será carregada no mesmo processo que carregou o <code> <a href="pt-BR/docs/Mozilla/Tech/XUL/Navegador"> navegador</a></code>.</li> - <li><code>URI_MUST_LOAD_IN_CHILD</code>: A página sempre será carregada em um processo filho.</li> - </ul> - - <p>Para usar um destes flags, retorne em sua implementação o <code>getURIFlags</code> no <a href="/en-US/docs/Custom_about:_URLs">código que registra o <code>about:</code> URI</a>.</p> - - <p>Se você usar essas flags, você deve registrar a página sobre um framescript para cada guia. Se você não configurar o multiprocesso Compatível com o verdadeiro no seu <code>install.rdf</code>, então serão usados os padrões. Mas os padrões dos e10s serão obsoletos em breve. Leia mais aqui - <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1257201">Erro 1257201</a>.</p> - </td> - </tr> - <tr> - <td><code>chrome:</code></td> - <td> - <p>Por padrão, as páginas <code>chrome:</code> são sempre carregadas no processo chrome. No entanto, quando você registra uma nova página <code>chrome</code>, você pode alterar esse padrão.</p> - - <p>Duas novas flags são definidas no <a href="/en-US/docs/Chrome Registration">file chrome.manifest</a>:</p> - - <ul> - <li>remoteenabled: a página será carregada no mesmo processo que carregou o<code> <a href="pt-BR/docs/Mozilla/Tech/XUL/Navegador"> navegador</a></code>.</li> - <li>remoterequired: a página sempre será carregada em um processo filho.</li> - </ul> - </td> - </tr> - <tr> - <td><code>file:</code></td> - <td> - <p>Sempre carregado em um processo de conteúdo.</p> - - <p><strong>Nota:</strong> Isso não significa que o <code>file:</code> URIs podem ser usado livremente em código de processos de conteúdo. O Sandboxing pode incluir listas predefinidas de diretórios particulares e futuras alterações podem restringir os <code>files:</code> URIs a um processo de conteúdo separado, isolado do conteúdo da Web normal. Veja <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1187099">bug 1187099 </a> como isso pode afetar os addons tentando carregar arquivos no diretório do perfil.</p> - </td> - </tr> - <tr> - <td><code>resource:</code></td> - <td>Sempre carregado em um processo de conteúdo.</td> - </tr> - </tbody> -</table> diff --git a/files/pt-br/mozilla/firefox/performance_best_practices_for_firefox_fe_engineers/index.html b/files/pt-br/mozilla/firefox/performance_best_practices_for_firefox_fe_engineers/index.html deleted file mode 100644 index 53e23e5f98..0000000000 --- a/files/pt-br/mozilla/firefox/performance_best_practices_for_firefox_fe_engineers/index.html +++ /dev/null @@ -1,328 +0,0 @@ ---- -title: Performance best practices for Firefox front-end engineers -slug: Mozilla/Firefox/Performance_best_practices_for_Firefox_fe_engineers -translation_of: Mozilla/Firefox/Performance_best_practices_for_Firefox_fe_engineers ---- -<div>{{FirefoxSidebar}}</div> - -<p>This guide will help Firefox developers working on front-end code produce code which is as performant as possible—not just on its own, but in terms of its impact on other parts of Firefox. Always keep in mind the side effects your changes may have, from blocking other tasks, to interfering with other user interface elements.</p> - -<h2 id="Avoid_the_main_thread_where_possible">Avoid the main thread where possible</h2> - -<p>The main thread is where we process user events and do painting. It's also important to note that most of our JavaScript runs on the main thread, so it's easy for script to cause delays in event processing or painting. That means that the more code we can get off of the main thread, the more that thread can respond to user events, paint, and generally be responsive to the user.</p> - -<p>You might want to consider using a {{domxref("Worker")}} if you need to do some computation that can be done off of the main thread. If you need more elevated privileges than a standard worker allows, consider using a {{domxref("ChromeWorker")}}, which is a Firefox-only API which lets you create workers with more elevated privileges.</p> - -<h2 id="Use_requestIdleCallback">Use requestIdleCallback()</h2> - -<p>If you simply cannot avoid doing some kind of long job on the main thread, try to break it up into smaller pieces that you can run when the browser has a free moment to spare, and the user isn't doing anything. You can do that using {{domxref("Window.requestIdleCallback", "requestIdleCallback()")}} and the <a href="/en-US/docs/Web/API/Background_Tasks_API">Cooperative Scheduling of Background Tasks API</a>, and doing it only when we have a free second where presumably the user isn’t doing something.</p> - -<p>See also the blog post <a href="https://hacks.mozilla.org/2016/11/cooperative-scheduling-with-requestidlecallback/">Collective scheduling with requestIdleCallback</a>.</p> - -<p>As of {{bug(1353206)}}, you can also schedule idle events in non-DOM contexts by using <code>Services.tm.idleDispatchToMainThread.</code> See the <code>nsIThreadManager.idl</code> file for more details.</p> - -<h2 id="Hide_your_panels">Hide your panels</h2> - -<p>If you’re adding a new XUL {{XULElem("popup")}} or {{XULElem("panel")}} to a document, set the {{XULAttr("hidden")}} attribute to <code>true</code> by default. By doing so, you cause the binding applied on demand rather than at load time, which makes initial construction of the XUL document faster.</p> - -<h2 id="Get_familiar_with_the_pipeline_that_gets_pixels_to_the_screen">Get familiar with the pipeline that gets pixels to the screen</h2> - -<p>Learn how pixels you draw make their way to the screen. Knowing the path they will take through the various layers of the browser engine will help you optimize your code to avoid pitfalls.</p> - -<p>The rendering process goes through the following steps:<img alt="This is the pipeline that a browser uses to get pixels to the screen." src="https://mdn.mozillademos.org/files/14995/pasted%20image%200.png" style="height: 167px; width: 1093px;"></p> - -<div class="note"> -<p>The above image is used under <a href="https://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a>, courtesy of <a href="https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing">this page</a> from our friends at Google, which itself is well worth the read.</p> -</div> - -<div class="note"> -<p>For a very down-to-earth explanation of the Style, Layout, Paint and Composite steps of the pipeline, <a href="https://hacks.mozilla.org/2017/08/inside-a-super-fast-css-engine-quantum-css-aka-stylo/">this Hacks blog post</a> does a great job of explaining it.</p> -</div> - -<p>To achieve a 60 FPS frame rate, all of the above has to happen in 16 milliseconds or less, every frame.</p> - -<p>Note that {{domxref("Window.requestAnimationFrame", "requestAnimationFrame()")}} lets you queue up JavaScript to <strong>run right before the style flush occurs</strong>. This allows you to put all of your DOM writes (most importantly, anything that could change the size or position of things in the DOM) just before the style and layout steps of the pipeline, combining all the style and layout calculations into a single batch so it all happens once, in a single frame tick, instead of across multiple frames. See {{anch("Detecting and avoiding synchronous reflow")}} below for more information.</p> - -<p>This also means that {{domxref("Window.requestAnimationFrame", "requestAnimationFrame()")}} is <strong>not a good place</strong> to put queries for layout or style information.</p> - -<h2 id="Detecting_and_avoiding_synchronous_style_flushes">Detecting and avoiding synchronous style flushes</h2> - -<h3 id="What_are_style_flushes">What are style flushes?</h3> - -<p>When CSS is applied to a document (HTML or XUL, it doesn’t matter), the browser does calculations to figure out which CSS styles will apply to each element. This happens the first time the page loads and the CSS is initially applied, but can happen again if JavaScript modifies the DOM.</p> - -<p>JavaScript code might, for example, change DOM node attributes (either directly or by adding or removing classes from elements), and can also add, remove, or delete DOM nodes. Because styles are normally scoped to the entire document, the cost of doing these style calculations is proportional to the number of DOM nodes in the document (and the number of styles being applied).</p> - -<p>It is expected that over time, script will update the DOM, requiring us to recalculate styles. Normally, the changes to the DOM just result in the standard style calculation occurring immediately after the JavaScript has finished running during the 16ms window, inside the "Style" step. That's the ideal scenario.</p> - -<p>However, it's possible for script to do things that force multiple style calculations (or <strong>style flushes</strong>) to occur synchronously during the JavaScript part of the 16 ms window. The more of them there are, the more likely they'll exceed the 16ms frame budget. If that happens, some of them will be postponed until the next frame (or possibly multiple frames, if necessary), this skipping of frames is called <strong>jank</strong>.</p> - -<p>Generally speaking, you force a synchronous style flush any time you query for style information after the DOM has changed within the same frame tick. Depending on whether or not <a href="https://gist.github.com/paulirish/5d52fb081b3570c81e3a">the style information you’re asking for has something to do with size or position</a>, you may also cause a layout recalculation (also referred to as <strong>layout flush</strong> or <strong>reflow</strong>), which is also an expensive step (see {{anch("Detecting and avoiding synchronous reflow")}} below).</p> - -<p>To avoid this: avoid reading style information if you can. If you <em>must</em> read style information, do so at the very beginning of the frame, before any changes have been made to the DOM since the last time a style flush occurred.</p> - -<p>Historically, there hasn't been an easy way of doing this - however, {{bug(1434376)}} has recently landed some ChromeOnly helpers to the window binding to make this simpler.</p> - -<p>If you want to queue up some JavaScript to run after the next "natural" style and layout flush, try:</p> - -<pre class="brush: js">// Suppose we want to get the computed "display" style of some node without -// causing a style flush. We could do it this way: -async function nodeIsDisplayNone(node) { - let display = await window.promiseDocumentFlushed(() => { - // Do _not_ under any circumstances write to the DOM in one of these - // callbacks! - return window.getComputedStyle(node).display; - }); - - return display == "none"; -} -</pre> - -<div class="note"> -<p>See {{anch("Detecting and avoiding synchronous reflow")}} for a more advanced example of getting layout information, and then setting it safely, without causing flushes.</p> -</div> - -<p><code>promiseDocumentFlushed</code> is only available to priviledged script, and should be called on the inner window of a top-level frame. Calling it on the outer window of a subframe is not supported, and calling it from within the inner window of a subframe might cause the callback to fire even though a style and layout flush will still be required. These gotchas should be fixed by {{bug(1441173)}}.</p> - -<p>For now, it is up to you as the consumer of this API to not accidentally write to the DOM within the <code>promiseDocumentFlushed</code> callback. Doing so might cause flushes to occur for other <code>promiseDocumentFlushed</code> callbacks that are scheduled to fire in the same tick of the refresh driver. {{bug(1441168)}} tracks work to make it impossible to modify the DOM within a <code>promiseDocumentFlushed</code> callback.</p> - -<h3 id="Writing_tests_to_ensure_you_don’t_add_more_synchronous_style_flushes">Writing tests to ensure you don’t add more synchronous style flushes</h3> - -<p>Unlike reflow, there isn’t a “observer” mechanism for style recalculations. However, as of Firefox 49, the {{ifattribute("nsIDOMWindowUtils", "elementsRestyled")}} attribute records a count of how many style calculations have occurred for a particular DOM window.</p> - -<p>It should be possible to write a test that gets the <code>nsIDOMWindowUtils</code> for a browser window, records the number of styleFlushes, then <strong>synchronously calls the function</strong> that you want to test, and immediately after checks the styleFlushes attribute again. If the value went up, your code caused synchronous style flushes to occur.</p> - -<p>Note that your test and function <em>must be called synchronously</em> in order for this test to be accurate. If you ever go back to the event loop (by yielding, waiting for an event, etc), style flushes unrelated to your code are likely to run, and your test will give you a false positive.</p> - -<h2 id="Detecting_and_avoiding_synchronous_reflow">Detecting and avoiding synchronous reflow</h2> - -<div class="note"> -<p>This is also sometimes called “sync layout”, "sync layout flushes" or “sync layout calculations”</p> -</div> - -<p><strong>Sync reflow</strong> is a term bandied about a lot, and has negative connotations. It's not unusual for an engineer to have only the vaguest sense of what it is—and to only know to avoid it. This section will attempt to demystify things.</p> - -<p>The first time a document (XUL or HTML) loads, we parse the markup, and then apply styles. Once the styles have been calculated, we then need to calculate where things are going to be placed on the page. This layout step can be seen in the “16ms” pipeline graphic above, and occurs just before we paint things to be composited for the user to see.</p> - -<p>It is expected that over time, script will update the DOM, requiring us to recalculate styles, and then update layout. Normally, however, the changes to the DOM just result in the standard style calculation that occurs immediately after the JavaScript has finished running during the 16ms window.</p> - -<h3 id="Interruptible_reflow">Interruptible reflow</h3> - -<p>Since <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=67752">the early days</a>, Gecko has had the notion of interruptible reflow. This is a special type of <strong>content-only</strong> reflow that checks at particular points whether or not it should be interrupted (usually to respond to user events).</p> - -<p>Because <strong>interruptible reflows can only be interrupted when laying out content, and not chrome UI</strong>, the rest of this section is offered only as context.</p> - -<p>When an interruptible reflow is interrupted, what really happens is that certain layout operations can be skipped in order to paint and process user events sooner.</p> - -<p>When an interruptible reflow is interrupted, the best-case scenario is that all layout is skipped, and the layout operation ends.</p> - -<p>The worst-case scenario is that none of the layout can be skipped despite being interrupted, and the entire layout calculation occurs.</p> - -<p>Reflows that are triggered "naturally" by the 16ms tick are all considered interruptible. Despite not actually being interuptible when laying out chrome UI, striving for interruptible layout is always good practice because uninterruptible layout has the potential to be much worse (see next section).</p> - -<p><strong>To repeat, only interruptible reflows in web content can be interrupted.</strong></p> - -<h3 id="Uninterruptible_reflow">Uninterruptible reflow</h3> - -<p>Uninterruptible reflow is what we want to <strong>avoid at all costs</strong>. Uninterruptible reflow occurs when some DOM node’s styles have changed such that the size or position of one or more nodes in the document will need to be updated, and then <strong>JavaScript asks for the size or position of anything</strong>. Since everything is pending a reflow, the answer isn't available, so everything stalls until the reflow is complete and the script can be given an answer. Flushing layout also means that styles must be flushed to calculate the most up-to-date state of things, so it's a double-whammy.</p> - -<p>Here’s a simple example, cribbed from <a href="http://paulrouget.com/e/fxoshud">this blog post by Paul Rouget</a>:</p> - -<pre class="brush: js">div1.style.margin = "200px"; // Line 1 -var height1 = div1.clientHeight; // Line 2 -div2.classList.add("foobar"); // Line 3 -var height2 = div2.clientHeight; // Line 4 -doSomething(height1, height2); // Line 5</pre> - -<p>At line 1, we’re setting some style information on a DOM node that’s going to result in a reflow - but (at just line 1) it’s okay, because that reflow will happen after the style calculation.</p> - -<p>Note line 2 though - we’re asking for the height of some DOM node. This means that Gecko needs to synchronously calculate layout (and styles) using an uninterruptible reflow in order to answer the question that JavaScript is asking (“What is the <code>clientHeight</code> of <code>div1</code>?”).</p> - -<p>It’s possible for our example to avoid this synchronous, uninterruptible reflow by moving lines 2 and 4 above line 1. Assuming there weren’t any style changes requiring size or position recalculation above line 1, the <code>clientHeight</code> information should be cached since the last reflow, and will not result in a new layout calculation.</p> - -<p>If you can avoid querying for the size or position of things in JavaScript, that’s the safest option—especially because it’s always possible that something earlier in this tick of JavaScript execution caused a style change in the DOM without you knowing it.</p> - -<p>Note that given the same changes to the DOM of a chrome UI document, a single synchronous uninterruptible reflow is no more computationally expensive than an interruptible reflow triggered by the 16ms tick. It is, however, advantageous to strive for reflow to only occur in the one place (the layout step of the 16ms tick) as opposed to multiple times during the 16ms tick (which has a higher probability of running through the 16ms budget).</p> - -<h3 id="How_do_I_avoid_triggering_uninterruptible_reflow">How do I avoid triggering uninterruptible reflow?</h3> - -<p>Here's a <a href="https://gist.github.com/paulirish/5d52fb081b3570c81e3a">list of things that JavaScript can ask for that can cause uninterruptible reflow</a>, to help you think about the problem. Note that some items in the list may be browser-specific or subject to change, and that an item not occurring explicitly in the list doesn't mean it doesn't cause reflow. For instance, at time of writing accessing <code>event.rangeOffset</code> <a href="https://searchfox.org/mozilla-central/rev/6bfadf95b4a6aaa8bb3b2a166d6c3545983e179a/dom/events/UIEvent.cpp#215-226">triggers reflow</a> in Gecko, and does not occur in the earlier link. If you're unsure whether something causes reflow, check!</p> - -<p>Note how abundant the properties in that first list are. This means that when enumerating properties on DOM objects (e.g. elements/nodes, events, windows, etc.) <strong>accessing the value of each enumerated property will almost certainly (accidentally) cause uninterruptible reflow</strong>, because a lot of DOM objects have one or even several properties that do so.</p> - -<p>If you require size or position information, you have a few options.</p> - -<p>{{bug(1434376)}} has recently landed a helper in the window binding to make it easier for priviledged code to queue up JavaScript to run when we know that the DOM is not dirty, and size, position, and style information is cheap to query for.</p> - -<p>Here's an example:</p> - -<pre class="brush: js">async function matchWidth(elem, otherElem) { - let width = await window.promiseDocumentFlushed(() => { - // Do _not_ under any circumstances write to the DOM in one of these - // callbacks! - return elem.clientWidth; - }); - - requestAnimationFrame(() => { - otherElem.style.width = `${width}px`; - }); -}</pre> - -<p>Please see the section on <code>promiseDocumentFlushed</code> in {{anch("Detecting and avoiding synchronous style flushes")}} for more information on how to use the API.</p> - -<p>Note that queries for size and position information are only expensive if the DOM has been written to. Otherwise, we're doing a cheap look-up of cached information. If we work hard to move all DOM writes into <code>requestAnimationFrame()</code>, then we can be sure that all size and position queries are cheap.</p> - -<p>It's also possible (though less infallible than <code>promiseDocumentFlushed</code>) to queue JavaScript to run very soon after the frame has been painted, where the likelihood is highest that the DOM has not been written to, and layout and style information queries are still cheap. This can be done by using a <code>setTimeout</code> or dispatching a runnable inside a <code>requestAnimationFrame</code> callback, for example:</p> - -<pre class="brush: js">requestAnimationFrame(() => { - setTimeout(() => { - // This code will be run ASAP after Style and Layout information have - // been calculated and the paint has occurred. Unless something else - // has dirtied the DOM very early, querying for style and layout information - // here should be cheap. - }, 0); -}); - -// Or, if you are running in privileged JavaScript and want to avoid the timer overhead, -// you could also use: - -requestAnimationFrame(() => { - Services.tm.dispatchToMainThread(() => { - // Same-ish as above. - }); -});</pre> - -<div class="note"> -<p>This also implies that<strong> </strong><em>querying for size and position information</em> in <code>requestAnimationFrame()</code> has a high probability of causing a synchronous reflow.</p> -</div> - -<h3 id="Other_useful_methods">Other useful methods</h3> - -<p>Below you'll find some suggestions for other methods which may come in handy when you need to do things without incurring synchronous reflow. These methods generally return the most-recently-calculated value for the requested value, which means the value may no longer be current, but may still be "close enough" for your needs. Unless you need precisely accurate information, they can be valuable tools in your performance toolbox.</p> - -<h4 id="nsIDOMWindowUtils.getBoundsWithoutFlushing">nsIDOMWindowUtils.getBoundsWithoutFlushing()</h4> - -<p><code>getBoundsWithoutFlushing()</code> does exactly what its name suggests: it allows you to get the bounds rectangle for a DOM node contained in a window without flushing layout. This means that the information you get is potentially out-of-date, but allows you to avoid a sync reflow. If you can make do with information that may not be quite current, this can be helpful.</p> - -<h4 id="nsIDOMWindowUtils.getRootBounds">nsIDOMWindowUtils.getRootBounds()</h4> - -<p>Like <code>getBoundsWithoutFlushing()</code>, <code>getRootBounds()</code> lets you get the dimensions of the window without risking a synchronous reflow.</p> - -<h4 id="nsIDOMWindowUtils.getScrollXY">nsIDOMWindowUtils.getScrollXY()</h4> - -<p>Returns the window's scroll offsets without taking the chance of causing a sync reflow.</p> - -<h3 id="Writing_tests_to_ensure_you_don’t_add_more_unintentional_reflow">Writing tests to ensure you don’t add more unintentional reflow</h3> - -<p>The interface {{source("docshell/base/nsIReflowObserver.idl", "nsIReflowObserver")}} lets us detect both interruptible and uninterruptible reflows. A number of tests have been written that exercise various functions of the browser (<a href="http://searchfox.org/mozilla-central/rev/78cefe75fb43195e7f5aee1d8042b8d8fc79fc70/browser/base/content/test/general/browser_tabopen_reflows.js">opening tabs</a>, <a href="http://searchfox.org/mozilla-central/source/browser/base/content/test/general/browser_windowopen_reflows.js">opening windows</a>) and ensure that we don’t add new uninterruptible reflows accidentally while those actions occur.</p> - -<p>You should add tests like this for your feature if you happen to be touching the DOM.</p> - -<h3 id="Detecting_over-painting_with_paint_flashing">Detecting over-painting with paint flashing</h3> - -<p>Painting is, in general, cheaper than both style calculation and layout calculation; still, the more you can avoid, the better. Generally speaking, the larger an area that needs to be repainted, the longer it takes. Similarly, the more things that need to be repainted, the longer it takes.</p> - -<p>Our graphics team has added a handy feature to help you detect when and where paints are occurring. This feature is called “paint flashing,” and it can be activated for both web content and the browser chrome. Paint flashing tints each region being painted with a randomly selected color so that it’s more easy to see what on the screen is being painted.</p> - -<ul> - <li>You can activate paint flashing for browser chrome by setting <code>nglayout.debug.paint_flashing_chrome</code> to <code>true</code>.</li> - <li>You can activate paint flashing for web content by setting <code>nglayout.debug.paint_flashing</code> to <code>true</code>.</li> -</ul> - -<p>After enabling these, exercise your function and see what’s painting. See a lot of flashing / colors? That means a lot of painting is going on. The worst case is called <strong>over-painting</strong>. This is when you draw multiple times over the same space. Unless transparency is involved, all but the last painting will be overwritten, becoming unnecessary. If you can find ways to avoid doing this, you can save substantial time.</p> - -<p>Keep in mind that painting occurs on the main thread. Remember, too, that the goal is to have as little happen on the main thread as possible. That means that finding and removing (when possible) over-painting is a good place to start reducing your burden on the main thread, which will in turn improve performance.</p> - -<p>Perhaps you’re animating something that requires a repaint? For example, transitioning the {{cssxref("background-color")}} of a DOM node from red to blue will result in a repaint for every frame of the animation, and paint flashing will reveal that. Consider using a different animation that can be accelerated by the GPU. These GPU-accelerated animations occur off of the main thread, and have a much higher probability of running at 60 FPS (see the section below called {{anch("Use the compositor for animations")}} for further details).</p> - -<p>Perhaps you’re touching some DOM nodes in such a way that unexpected repaints are occurring in an area that don’t need it. Best to investigate and try to remove those as best you can. Sometimes, our graphics layer invalidates regions in ways that might not be clear to you, and a section outside of the thing that just repainted will also repaint. Sometimes this can be addressed by ensuring that the thing changing is on its own layer (though this comes at a memory cost). You can put something on its own layer by setting its {{cssxref("z-index")}}, or by setting the {{cssxref("will-change")}} on the node, though this should be used sparingly.</p> - -<p>If you’re unsure why something is repainting, consider talking to our always helpful graphics team in the <a href="https://chat.mozilla.org/#/room/#gfx:mozilla.org">gfx room</a> on <a href="https://wiki.mozilla.org/Matrix">Matrix</a>, and they can probably advise you. Note that a significant number of the graphics team members are in the US Eastern Time zone (UTC-5 or UTC-4 during Daylight Saving Time), so let that information guide your timing when you ask questions in the <a href="https://chat.mozilla.org/#/room/#gfx:mozilla.org">gfx room</a> .</p> - -<h2 id="Adding_nodes_using_DocumentFragments">Adding nodes using DocumentFragments</h2> - -<p>Sometimes you need to add several DOM nodes as part of an existing DOM tree. For example, when using XUL {{XULElem("menupopup")}}s, you often have script which dynamically inserts {{XULElem("menuitem")}}s. Inserting items into the DOM has a cost. If you're adding a number of children to a DOM node in a loop, it's often more efficient to batch them into a single insertion by creating a {{domxref("DocumentFragment")}}, adding the new nodes to that, then inserting the <code>DocumentFragment</code> as a child of the desired node.</p> - -<p>A <code>DocumentFragment</code> is maintained in memory outside the DOM itself, so changes don't cause reflow. The API is straightforward:</p> - -<ol> - <li>Create the <code>DocumentFragment</code> by calling {{domxref("Document.createDocumentFragment()")}}.</li> - <li>Create each child element (by calling {{domxref("Document.createElement()")}} for example), and add each one to the fragment by calling {{domxref("Node.appendChild", "DocumentFragment.appendChild()")}}.</li> - <li>Once the fragment is populated, append the fragment to the DOM by calling {{domxref("Node.appendChild", "appendChild()")}} on the parent element for the new elements.</li> -</ol> - -<p>This example has been cribbed from <a href="https://davidwalsh.name/documentfragment">davidwalsh’s blog post</a>:</p> - -<pre class="brush: js">// Create the fragment - -var frag = document.createDocumentFragment(); - -// Create numerous list items, add to fragment - -for(var x = 0; x < 10; x++) { - var li = document.createElement("li"); - li.innerHTML = "List item " + x; - frag.appendChild(li); -} - -// Mass-add the fragment nodes to the list - -listNode.appendChild(frag); -</pre> - -<p>The above is strictly cheaper than individually adding each node to the DOM.</p> - -<h2 id="The_Gecko_profiler_add-on_is_your_friend">The Gecko profiler add-on is your friend</h2> - -<p>The Gecko profiler is your best friend when diagnosing performance problems and looking for bottlenecks. There’s plenty of excellent documentation on MDN about the Gecko profiler:</p> - -<ul> - <li><a href="/en-US/docs/Mozilla/Performance/Reporting_a_Performance_Problem">Basic instructions for gathering and sharing a performance profile</a></li> - <li><a href="/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler">Advanced profile analysis</a></li> -</ul> - -<h2 id="Don’t_guess—measure.">Don’t guess—measure.</h2> - -<p>If you’re working on a performance improvement, this should go without saying: ensure that what you care about is actually improving by measuring before and after.</p> - -<p>Landing a speculative performance enhancement is the same thing as landing speculative bug fixes—these things need to be tested. Even if that means instrumenting a function with a {{jsxref("Date.now()")}} recording at the entrance, and another <code>Date.now()</code> at the exit points in order to measure processing time changes.</p> - -<p>Prove to yourself that you’ve actually improved something by measuring before and after.</p> - -<h3 id="Use_the_performance_API">Use the performance API</h3> - -<p>The <a href="/en-US/docs/Web/API/Performance_API">performance API</a> is very useful for taking high-resolution measurements. This is usually much better than using your own hand-rolled timers to measure how long things take. You access the API through {{domxref("Window.performance")}}.</p> - -<p>Also, the Gecko profiler back-end is in the process of being modified to expose things like markers (from {{domxref("Performance.mark", "window.performance.mark()")}}).</p> - -<h2 id="Use_the_compositor_for_animations">Use the compositor for animations</h2> - -<p>Performing animations on the main thread should be treated as <strong>deprecated</strong>. Avoid doing it. Instead, animate using {{domxref("Element.animate()")}}. See the article <a href="https://hacks.mozilla.org/2016/08/animating-like-you-just-dont-care-with-element-animate/">Animating like you just don't care</a> for more information on how to do this.</p> - -<h2 id="Explicitly_define_start_and_end_animation_values">Explicitly define start and end animation values</h2> - -<p>Some optimizations in the animation code of Gecko are based on an expectation that the <code>from</code> (0%) and the <code>to</code> (100%) values will be explicitly defined in the <code>@keyframes</code> definition. Even though these values may be inferred through the use of initial values or the cascade, the offscreen animation optimizations are dependent on the explicit definition. See <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1419096#c18">this comment</a> and a few previous comments on that bug for more information.</p> - -<h2 id="Use_IndexedDB_for_storage">Use IndexedDB for storage</h2> - -<p><a href="en-US/docs/Web/HTML/Using_the_application_cache">AppCache</a> and <a href="/en-US/docs/Web/API/Storage/LocalStorage">LocalStorage</a> are synchronous storage APIs that will block the main thread when you use them. Avoid them at all costs!</p> - -<p><a href="/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB">IndexedDB</a> is preferable, as the API is asynchronous (all disk operations occur off of the main thread), and can be accessed from web workers.</p> - -<p>IndexedDB is also arguably better than storing and retrieving JSON from a file—particularly if the JSON encoding or decoding is occurring on the main thread. IndexedDB will do JavaScript object serialization and deserialization for you using the <a href="/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm">structured clone algorithm</a>, meaning that you can stash <a href="/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#Supported_types">things like maps, sets, dates, blobs, and more</a>, without having to do conversions for JSON compatibility.</p> - -<p>A Promise-based wrapper for IndexedDB, <a href="http://searchfox.org/mozilla-central/source/toolkit/modules/IndexedDB.jsm">IndexedDB.jsm</a>, is available for chrome code.</p> - -<h2 id="Test_on_weak_hardware">Test on weak hardware</h2> - -<p>For the folks paid to work on Firefox, we tend to have pretty powerful hardware for development. This is great, because it reduces build times, and means we can do our work faster.</p> - -<p>We should remind ourselves that the majority of our user base is unlikely to have similar hardware. Look at the <a href="https://metrics.mozilla.com/firefox-hardware-survey/">Firefox Hardware Report</a> to get a sense of what our users are working with. Test on slower machines to make it more obvious to yourself if what you’ve written impacts the performance of the browser.</p> - -<h2 id="Consider_loading_scripts_with_the_subscript_loader_asynchronously">Consider loading scripts with the subscript loader asynchronously</h2> - -<p>If you've ever used the subscript loader, you might not know that it can load scripts asynchronously, and return a Promise once they're loaded. For example:</p> - -<pre class="brush: js">Services.scriptloader.loadSubScriptWithOptions(myScriptURL, { async: true }).then(() => { - console.log("Script at " + myScriptURL + " loaded asynchronously!"); -});</pre> diff --git a/files/pt-br/mozilla/firefox/privacidade/index.html b/files/pt-br/mozilla/firefox/privacidade/index.html deleted file mode 100644 index dd6979435e..0000000000 --- a/files/pt-br/mozilla/firefox/privacidade/index.html +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Privacidade -slug: Mozilla/Firefox/Privacidade -translation_of: Mozilla/Firefox/Privacy ---- -<div>{{FirefoxSidebar}}</div><ul> - <li><a href="/pt-BR/Firefox/Privacidade/Proteção_de_rastreamento">Proteção de rastreamento</a></li> -</ul> - -<div style="display: none;" class="pcl_tooltip_box">Image already added -<div class="arrow border"> </div> - -<div class="arrow"> </div> -</div> - -<div style="display: none;" class="pcl_global_mask"> </div> diff --git a/files/pt-br/mozilla/firefox/privacidade/proteção_de_rastreamento/index.html b/files/pt-br/mozilla/firefox/privacidade/proteção_de_rastreamento/index.html deleted file mode 100644 index 438c240001..0000000000 --- a/files/pt-br/mozilla/firefox/privacidade/proteção_de_rastreamento/index.html +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Proteção de rastreamento -slug: Mozilla/Firefox/Privacidade/Proteção_de_rastreamento -translation_of: Mozilla/Firefox/Privacy/Tracking_Protection ---- -<div>{{FirefoxSidebar}}</div> - -<h2 id="O_que_é_proteção_de_rastreamento">O que é proteção de rastreamento?</h2> - -<p><span id="result_box" lang="pt"><span>Começando na versão 42, o Firefox Desktop e o Firefox para Android incluem proteção de rastreamento embutida.</span> <span>Nas janelas de Navegação Privada (guias, no Firefox para Android), o Firefox bloqueará o conteúdo carregado de domínios que acompanham os usuários em todos os sites.</span></span></p> - -<p><span id="result_box" lang="pt"><span>Alguns conteúdos bloqueados fazem parte do layout da página e os usuários podem notar problemas de layout onde o Firefox bloqueou essas cargas.</span> <span>Às vezes, os usuários não percebem nada, mas a grade da página pode funcionar de modo que outros elementos da página se deslizem para preencher os buracos deixados pelos elementos bloqueados.</span></span></p> - -<p><span id="result_box" lang="pt"><span>Quando o Firefox bloqueia o conteúdo, ele registrará uma mensagem no Console da Web como este:</span></span></p> - -<pre>The resource at "http://some/url" was blocked because tracking protection is enabled.</pre> - -<p><span id="result_box" lang="pt"><span>Note que, com o Firefox para Android, você pode acessar a saída do console usando o depurador remoto.</span></span></p> - -<p><span id="result_box" lang="pt"><span>A interface do usuário do Firefox indicará aos usuários quando o conteúdo foi bloqueado e habilitá-los a desbloqueá-lo para a sessão atual se eles escolherem.</span> <span>Os usuários também poderão desativar a proteção de rastreamento inteiramente se eles escolherem.</span></span></p> - -<h2 id="Como_o_Firefox_escolhe_o_que_bloquear">Como o Firefox escolhe o que bloquear?</h2> - -<p><span id="result_box" lang="pt"><span>O conteúdo é bloqueado com base no domínio do qual ele deve ser carregado.</span></span></p> - -<p><span id="result_box" lang="pt"><span>O Firefox enviará uma lista de sites que foram identificados como envolvidos no rastreamento de sites de usuários.</span> <span>Quando a proteção de rastreamento é ativada, o Firefox bloqueará o conteúdo de sites na lista.</span></span></p> - -<p><span id="result_box" lang="pt"><span>Os sites que rastreiam usuários são mais comuns os sites de publicidade e análise de terceiros.</span></span></p> - -<h2 id="O_que_isso_significa_para_o_seu_site">O que isso significa para o seu site?</h2> - -<p><span id="result_box" lang="pt"><span>Mais obviamente, isso significa que quando a proteção de rastreamento está habilitada:</span></span></p> - -<ul> - <li><span id="result_box" lang="pt"><span>O conteúdo veiculado a partir de rastreadores de terceiros não será visível para usuários</span></span></li> - <li><span id="result_box" lang="pt"><span>Seu site não poderá usar serviços de publicidade ou analítica de terceiros que se envolvam em rastreamento</span></span></li> -</ul> - -<p><span id="result_box" lang="pt"><span>Mais sutilmente, se outras partes do seu site dependerem de rastreadores sendo carregados, essas partes também serão quebradas quando a proteção de rastreamento estiver ativada.</span> <span>Por exemplo, se o seu site incluir um retorno de chamada que é executado quando o conteúdo de um site de rastreamento é carregado, o retorno de chamada não será executado.</span></span></p> - -<p><span id="result_box" lang="pt"><span>Por exemplo, você não deve usar o Google Analytics da seguinte maneira:</span></span></p> - -<pre class="brush:html example-bad"><a href="http://www.example.com" onclick="trackLink('http://www.example.com', event);">Visit example.com</a> -<script> -function trackLink(url,event) { - event.preventDefault(); - ga('send', 'event', 'outbound', 'click', url, { - 'transport': 'beacon', - 'hitCallback': function() { - document.location = url; - } - }); -} -</script></pre> - -<p><span id="result_box" lang="pt"><span>Em vez disso, você deve considerar verificar quando o objeto "ga", para o Google Analytics, foi inicializado ou não:</span></span></p> - -<pre class="brush:html example-good"><a href="http://www.example.com" onclick="trackLink('http://www.example.com', event);">Visit example.com</a> -<script> -function trackLink(url,event) { - event.preventDefault(); - if (window.ga && <span class="pl-smi">ga</span>.loaded) { - ga('send', 'event', 'outbound', 'click', url, { - 'transport': 'beacon', - 'hitCallback': function() { document.location = url; } - }); - } else { - document.location = url; - } -} -</script> -</pre> - -<p><span id="result_box" lang="pt"><span>Mais informações sobre esta técnica estão disponíveis em</span></span> <a href="https://hacks.mozilla.org/2016/01/google-analytics-privacy-and-event-tracking/">Google Analytics, Privacy, and Event Tracking</a>.</p> - -<p><span id="result_box" lang="pt"><span>Observe que, dependendo de um terceiro dessa maneira, não é uma boa prática, pois isso significa que seu site pode ser quebrado se o terceiro estiver lento ou não disponível, ou se o rastreador estiver bloqueado por um complemento.</span></span></p> - -<div class="pcl_tooltip_box" style="display: none;">Image already added -<div class="arrow border"> </div> - -<div class="arrow"> </div> -</div> - -<div class="pcl_global_mask" style="display: none;"> </div> diff --git a/files/pt-br/mozilla/firefox/privacy/storage_access_policy/errors/cookieblockedtracker/index.html b/files/pt-br/mozilla/firefox/privacy/storage_access_policy/errors/cookieblockedtracker/index.html deleted file mode 100644 index 0813b1fd2c..0000000000 --- a/files/pt-br/mozilla/firefox/privacy/storage_access_policy/errors/cookieblockedtracker/index.html +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: 'Bloquado: Solicitações de acesso de armazenamento de rastreadores' -slug: Mozilla/Firefox/Privacy/Storage_access_policy/Errors/CookieBlockedTracker -tags: - - Armazenamento - - Cookies - - Erros - - Política de acesso a armazenamento - - Rastreamento -translation_of: Mozilla/Firefox/Privacy/Storage_access_policy/Errors/CookieBlockedTracker ---- -<div>{{FirefoxSidebar}}</div> - -<h2 id="Mensagem">Mensagem</h2> - -<p>Firefox:</p> - -<pre class="syntaxbox"><span class="message-body-wrapper"><span class="message-flex-body"><span class="devtools-monospace message-body"><span class="objectBox objectBox-string">O pedido para acessar cookies ou armazenamento em "X" foi bloqueado porque veio de um rastreador e o bloqueio de conteúdo está ativado.</span></span></span></span> -</pre> - -<h2 id="Oque_deu_errado">Oque deu errado?</h2> - -<p>A requisição para accessar os cookies ou armazenamento foi bloqueada por que o navegador identificou <span class="tlid-translation translation" lang="pt"><span title="">como proveniente de um rastreador e o bloqueio de conteúdo está ativado</span></span>.</p> - -<p>A permissão pode ser modificada ou removida por:</p> - -<ul> - <li>Indo a <em>Preferências > </em>Bloqueio de Conteúdo e - - <ul> - <li>adicionando uma exceção com o botão <em>Gerenciar Exceções</em>…</li> - <li>escolhendo o Bloqueio de conteúdo personalizado e desmarcar a caixa de seleção Rastreador</li> - </ul> - </li> -</ul> - -<p>se a resolução que foi bloqueada não precisar de autenticação, você consegue resolver a aviso de erro adicinando um atributo <code>crossorigin="anonymous"</code> para o elemento relevante.</p> - -<h2 id="Veja_também">Veja também</h2> - -<ul> - <li><a href="https://support.mozilla.org">Bloqueio de conteúdo</a> em <a href="https://support.mozilla.org">support.mozilla.org</a></li> - <li><a href="/en-US/docs/Web/HTML/CORS_settings_attributes">O atributo <code>crossorigin</code></a></li> -</ul> diff --git a/files/pt-br/mozilla/firefox/privacy/storage_access_policy/errors/index.html b/files/pt-br/mozilla/firefox/privacy/storage_access_policy/errors/index.html deleted file mode 100644 index a1e1f54a75..0000000000 --- a/files/pt-br/mozilla/firefox/privacy/storage_access_policy/errors/index.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Errors -slug: Mozilla/Firefox/Privacy/Storage_access_policy/Errors -tags: - - Cookies - - Errors - - NeedsTranslation - - Storage - - TopicStub - - storage access policy -translation_of: Mozilla/Firefox/Privacy/Storage_access_policy/Errors ---- -<div>{{FirefoxSidebar}}</div> - -<p>This page lists the errors that can be raised due to Firefox's anti-tracking functionality, governed by the <a href="/en-US/docs/Mozilla/Firefox/Privacy/Storage_access_policy">Storage access policy</a>. You can find further information about them by clicking on the links below:</p> - -<p>A request to access cookies or storage was blocked because</p> - -<ul> - <li><a href="/en-US/docs/Mozilla/Firefox/Privacy/Storage_access_policy/Errors/CookieBlockedByPermission">of custom cookie permission</a></li> - <li><a href="/en-US/docs/Mozilla/Firefox/Privacy/Storage_access_policy/Errors/CookieBlockedTracker">it came from a tracker and content blocking is enabled</a></li> - <li><a href="/en-US/docs/Mozilla/Firefox/Privacy/Storage_access_policy/Errors/CookieBlockedAll">we are blocking all storage access requests</a></li> - <li><a href="/en-US/docs/Mozilla/Firefox/Privacy/Storage_access_policy/Errors/CookieBlockedForeign">we are blocking all third-party storage access requests and content blocking is enabled</a></li> -</ul> diff --git a/files/pt-br/mozilla/firefox/privacy/storage_access_policy/index.html b/files/pt-br/mozilla/firefox/privacy/storage_access_policy/index.html deleted file mode 100644 index c86f213323..0000000000 --- a/files/pt-br/mozilla/firefox/privacy/storage_access_policy/index.html +++ /dev/null @@ -1,263 +0,0 @@ ---- -title: 'Storage access policy: Block cookies from trackers' -slug: Mozilla/Firefox/Privacy/Storage_access_policy -tags: - - NeedsTranslation - - Privacy - - TopicStub - - storage access policy - - tracking protection -translation_of: Mozilla/Firefox/Privacy/Storage_access_policy ---- -<div>{{FirefoxSidebar}}</div> - -<p class="summary">Firefox includes a new storage access policy that blocks cookies and other site data from third-party tracking resources. This policy is designed as an alternative to the <a href="/en-US/docs/Mozilla/Cookies_Preferences">older cookie policies</a>, which have been available in Firefox for many years. This policy protects against cross-site tracking while minimizing the site breakage associated with traditional cookie blocking. This article explains how the policy works and how you can test it.</p> - -<h2 id="Testing_in_Firefox">Testing in Firefox</h2> - -<p>This cookie policy has been available in Firefox since version 63. This documentation describes the policy that we intend to ship to Firefox Release users, but may not match what is implemented in the current Release version of Firefox. That's because we document new aspects of the policy as soon as they land in <a href="https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly">Firefox Nightly</a>, our pre-release channel. Firefox Nightly may also contain experimental features that we don't yet plan to ship to Release users; experimental features will not be included in this documentation, but may nevertheless impact the functionality of domains classified as trackers.</p> - -<p>We recommend sites test with <a href="https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly">Firefox Nightly</a>, as this includes the newest version of our protections. As described above, note that Nightly may include additional protections that end up getting removed or changed before they reach our Release users. We’ll keep this page updated with the newest information as we strengthen our protections.</p> - -<p>These protections are on by default in Nightly. The cookie policy can be enabled in other versions of Firefox through the <a href="https://support.mozilla.org/en-US/kb/content-blocking">Content Blocking settings</a> (these steps will vary by version; the linked documentation includes a dropdown to select the appropriate Firefox version).</p> - -<h3 id="Report_Broken_Sites">Report Broken Sites</h3> - -<p>If you find a website broken as a result of this change, file a bug under the Tracking Protection component within the Firefox product on <a href="https://bugzilla.mozilla.org/enter_bug.cgi?assigned_to=nobody%40mozilla.org&blocked=1480137&bug_file_loc=http%3A%2F%2F&bug_ignored=0&bug_severity=normal&bug_status=NEW&cf_fx_iteration=---&cf_fx_points=---&cf_platform_rel=---&cf_status_firefox62=---&cf_status_firefox63=---&cf_status_firefox64=---&cf_status_firefox_esr60=---&cf_status_geckoview62=---&cf_tracking_firefox62=---&cf_tracking_firefox63=---&cf_tracking_firefox64=---&cf_tracking_firefox_esr60=---&cf_tracking_firefox_relnote=---&cf_tracking_geckoview62=---&component=Tracking%20Protection&contenttypemethod=list&contenttypeselection=text%2Fplain&defined_groups=1&flag_type-203=X&flag_type-37=X&flag_type-41=X&flag_type-5=X&flag_type-607=X&flag_type-721=X&flag_type-737=X&flag_type-748=X&flag_type-787=X&flag_type-799=X&flag_type-800=X&flag_type-803=X&flag_type-835=X&flag_type-846=X&flag_type-855=X&flag_type-864=X&flag_type-914=X&flag_type-916=X&flag_type-929=X&flag_type-930=X&flag_type-933=X&form_name=enter_bug&maketemplate=Remember%20values%20as%20bookmarkable%20template&op_sys=Unspecified&priority=--&product=Firefox&rep_platform=Unspecified&target_milestone=---&version=unspecified">Bugzilla</a>. Alternatively you can report broken sites directly in Firefox by clicking "Report a Problem" in the Content Blocking section of the <a href="https://support.mozilla.org/en-US/kb/control-center-site-privacy-and-security-firefox">Control Center</a> (this shortcut may not be available in all versions of Firefox).</p> - -<h2 id="Tracking_protection_explained">Tracking protection explained</h2> - -<p>How does Firefox determine which resources are tracking resources?</p> - -<p>Firefox uses the Tracking Protection list to determine which resources are tracking resources. The Tracking Protection list is <a href="https://github.com/disconnectme/disconnect-tracking-protection/issues">maintained by Disconnect</a>. When the list is applied in Firefox, we make two important changes:</p> - -<ul> - <li>First, we only use the "Basic Protection" version of the list, which <a href="https://github.com/mozilla-services/shavar-prod-lists#blacklist">excludes some categories of trackers</a>. In the future, we may expand our protections to use the "Strict Protection" version of the list.</li> - <li>Second, Firefox uses an additional "<a href="https://github.com/mozilla-services/shavar-prod-lists/blob/master/disconnect-entitylist.json">entity list</a>", which prevents <a href="https://github.com/mozilla-services/shavar-prod-lists#entity-list">domains from being classified as trackers when they are loaded on a top-level site owned by the same organization</a>.</li> -</ul> - -<p>Firefox uses the built-in <a href="https://support.mozilla.org/en-US/kb/tracking-protection">Tracking Protection</a> URL classifier to determine which resources match the tracking protection list. Domains are matched against the list in accordance with the <a href="https://developers.google.com/safe-browsing/v4/urls-hashing#suffixprefix-expressions">SafeBrowsing v4 specification</a>. Specifically, we check the exact hostname of the resource against the list, as well as the last four hostnames formed by starting with the last five components and successively removing the leading component. Consider the following examples:</p> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Hostname on the list</th> - <th scope="col">Hostname of resource</th> - <th scope="col">Matched</th> - </tr> - </thead> - <tbody> - <tr> - <td><code>example.com</code></td> - <td><code>example.com</code></td> - <td>Yes</td> - </tr> - <tr> - <td><code>example.com</code></td> - <td><code>a.b.example.com</code></td> - <td>Yes</td> - </tr> - <tr> - <td><code>blah.example.com</code></td> - <td><code>example.com</code></td> - <td>No</td> - </tr> - <tr> - <td><code>a.b.example.com</code></td> - <td><code>c.d.example.com</code></td> - <td>No</td> - </tr> - <tr> - <td><code>blah.example.com</code></td> - <td><code>foo.blah.example.com</code></td> - <td>Yes</td> - </tr> - </tbody> -</table> - -<h2 id="What_does_the_storage_access_policy_block">What does the storage access policy block?</h2> - -<p>The storage access policy blocks resources identified as trackers from accessing their cookies and other site storage when they are loaded in a third-party context. This prevents those resources from retrieving tracking identifiers stored in cookies or site storage and using them to identify users across visits to multiple first parties. Specifically, Firefox does this by imposing the following restrictions:</p> - -<p>Cookies:</p> - -<ul> - <li>Block {{httpheader("Cookie")}} request headers and ignore {{httpheader("Set-Cookie")}} response headers.</li> - <li>Return an empty string for calls to {{domxref("Document.cookie")}} and ignore requests to set cookies via <code>Document.cookie</code>.</li> -</ul> - -<p>DOM Storage:</p> - -<ul> - <li><a href="/en-US/docs/Web/API/Web_Storage_API">localStorage</a>: <code><a href="/en-US/docs/Web/API/Window/localStorage">Window.localStorage</a></code> is <code>null</code>. Thus, attempts to read and write using this object will throw a <code>TypeError</code> exception.</li> - <li><a href="/en-US/docs/Web/API/Web_Storage_API">sessionStorage</a>: read and write attempts are permitted.</li> - <li><a href="/en-US/docs/Web/API/IndexedDB_API">IndexedDB</a>: read and write attempts throw a <code>SecurityError</code> exception.</li> -</ul> - -<p>Messaging and Workers:</p> - -<ul> - <li><a href="/en-US/docs/Web/API/Broadcast_Channel_API">Broadcast Channel</a>: attempts to create a new {{domxref("BroadcastChannel")}} will throw a <code>SecurityError</code> exception.</li> - <li><a href="/en-US/docs/Web/API/Web_Workers_API">Shared Worker</a>: attempts to create a new {{domxref("SharedWorker")}} will throw a <code>SecurityError</code> exception.</li> - <li><a href="/en-US/docs/Web/API/Service_Worker_API">Service Worker</a>: attempts to create a new {{domxref("ServiceWorker")}} will throw a <code>SecurityError</code> exception.</li> -</ul> - -<p>DOM Cache:</p> - -<ul> - <li>Calls to {{domxref("CacheStorage")}} will always reject with a <code>SecurityError</code>.</li> -</ul> - -<p>Browser caches:</p> - -<ul> - <li>The <a href="/en-US/docs/Mozilla/HTTP_cache">HTTP cache</a> and the Image cache are partitioned for tracking resources, such that each top-level origin will have a separate partition and tracking resources on different top-level origins will be cached separate from each other.</li> -</ul> - -<p>Network connections:</p> - -<ul> - <li><a href="https://wiki.mozilla.org/Security/Server_Side_TLS#Session_Resumption">TLS sessions</a> will not be resumed using a session ticket when an HTTPS connection is made to an embedded third-party resource that is classified as a tracker.</li> - <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Connection_management_in_HTTP_1.x#Persistent_connections">HTTP connection reuse</a> by domains classified as trackers is limited to requests that occur under the same top-level origin. For example, a request for content from tracker.example on news.example will not reuse an HTTP connection with a request for content from tracker.example on shopping.example or with requests that occur when tracker.example is visited directly (i.e., as a first party).</li> -</ul> - -<h3 id="What_is_not_blocked_by_the_policy">What is not blocked by the policy?</h3> - -<ol> - <li>This policy does not currently restrict third-party storage access for resources that are not classified as tracking resources. We may choose to apply additional restrictions to third-party storage access in the future.</li> - <li>The restrictions applied by the policy will not prevent third-party scripts classified as tracking resources from accessing storage in the main context of the page. These scripts can continue to use storage scoped to the top-level origin.</li> - <li>Origins classified as trackers will have access to their own storage when they are loaded in a first-party context.</li> - <li>Cross-origin resources loaded from the same eTLD+1 as the top-level context will still have access to their storage.</li> - <li>Origins normally classified as trackers will <a href="https://github.com/mozilla-services/shavar-prod-lists#entity-list">not be blocked if the top-level page origin is determined to be from the same organization as them</a>.</li> -</ol> - -<h2 id="Storage_access_grants">Storage access grants</h2> - -<p>In order to improve web compatibility and permit third-party integrations that require storage access, Firefox will grant storage access scoped to the first party for a particular third-party origin as described in this section. Currently, Firefox includes some web compatibility heuristics that grant storage access to third-party resources classified as trackers when a user interacts with those third parties. We do this when we expect that not granting access would cause the web page to break. We also support an initial implementation of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API">Storage Access API</a>, through which embedded {{htmlelement("iframe")}}s can request storage access by calling {{domxref("Document.requestStorageAccess()")}}. Although both of these approaches provide the same level of storage access, we recommend third parties switch to using the Storage Access API in order to guarantee their access to storage.</p> - -<h3 id="Automatic_storage_access_upon_interaction">Automatic storage access upon interaction</h3> - -<p>In order to improve web compatibility, Firefox currently includes some heuristics to grant storage access automatically to third parties that receive user interaction. These heuristics are intended to allow some third-party integrations that are common on the web to continue to function. They are intended to be temporary and will be removed in a future version of Firefox. They should not be relied upon for current and future web development.</p> - -<p>Third-party storage access may be granted to resources that have been classified as tracking resources when a user gesture triggers a pop-up window that has <a href="/en-US/docs/Web/API/Window/opener">opener access</a> to the originating document. When that occurs, there are two possible ways a third-party origin can be granted access:</p> - -<ul> - <li>The origin of the resource that is initially loaded in the pop-up window is granted storage access on the opener document if that origin has received user interaction as a first party within the past 30 days.</li> - <li>After the initial resource is loaded in the pop-up window, the window may go through a series of redirects to other hosts. If a user interacts with the pop-up window following a redirect, the origin of the content loaded in the pop-up window is given storage access on the opener document.</li> -</ul> - -<h3 id="Scope_of_storage_access">Scope of storage access</h3> - -<p>When storage access is granted, it is scoped to the origin of the opener document or subdomains of that origin. Access that is granted on the subdomain of an origin does not extend to the top-level origin. As an example, if a resource from <code>tracker.example</code> is granted storage access on <code>foo.example.com</code>, then <code>tracker.example</code> will be able to access its cookies on <code>bar.foo.example.com</code> but not <code>example.com</code>. Instead, if <code>tracker.example</code> were granted access on <code>example.com</code> it would be able to access its storage on <code>bar.foo.example.com</code>, <code>foo.example.com</code>, and <code>example.com</code>.</p> - -<p>When storage access is granted to <code>tracker.example</code> on <code>example.com</code>, all resources loaded from <code>tracker.example</code> on any top-level document loaded from <code>example.com</code> are immediately given storage access. This includes all resources loaded in the main context of the page, embedded <code><iframe></code>s, and resources loaded within embedded <code><iframe></code>s. Storage access is not extended to other resources loaded on <code>example.com</code> (e.g. <code>other-tracker.example</code>), nor to other first parties on which <code>tracker.example</code> is embedded (e.g. <code>example.org</code>).</p> - -<p>Storage access grants extend into the first level of nested contexts, but no further. This means that <code><iframe></code>s embedded in the main context of the page and loaded from a domain classified as a tracker will have full access to all storage locations accessible through JavaScript. Similarly, requests for resources loaded in <code><iframe></code>s embedded in the main context of the page will have access to HTTP cookies. However, further nested contexts, including but not limited to those from the origin classified as a tracker, will not be granted storage access.</p> - -<p>Consider the following embedding scenarios on a top-level page loaded from <code>example.com</code> on which <code>tracker.example</code> has been granted storage access.</p> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Embedding</th> - <th scope="col">tracker.example resource storage access</th> - </tr> - </thead> - <tbody> - <tr> - <td>An image is loaded from <code>tracker.example</code> and embedded in the main context of <code>example.com</code>.</td> - <td>HTTP: Yes<br> - JS: N/A</td> - </tr> - <tr> - <td><code>example.com</code> embeds an <code><iframe></code> from <code>example.org</code>. That <code><iframe></code> goes on to load an image from <code>tracker.example</code>.</td> - <td>HTTP: Yes<br> - JS: N/A</td> - </tr> - <tr> - <td><code>example.com</code> embeds an <code><iframe></code> from <code>example.org</code>. That <code><iframe></code> goes on to embed an <code><iframe></code> from <code>tracker.example</code>.</td> - <td>HTTP: Yes<br> - JS: No</td> - </tr> - <tr> - <td><code>example.com</code> embeds an <code><iframe></code> from <code>tracker.example</code>.</td> - <td>HTTP: Yes<br> - JS: Yes</td> - </tr> - <tr> - <td><code>example.com</code> embeds an <code><iframe></code> from <code>example.com</code> (same origin). The nested <code><iframe></code> embeds an <code><iframe></code> from <code>tracker.example</code>.</td> - <td>HTTP: Yes<br> - JS: No</td> - </tr> - </tbody> -</table> - -<h3 id="Storage_access_expiration">Storage access expiration</h3> - -<p>The storage access grant expires after 30 days. Domains classified as tracking resources may be granted third-party storage access on multiple first parties, and the storage permission for each party expires independently. The above heuristics will also serve to extend the lifetime of a third-party storage permission on origins that have already been granted access. Each time the heuristic is activated, or a success call to the Storage Access API is made, the pre-existing storage access expiration will be extended by 30 days, counting from the time the previous access was granted.</p> - -<p>Please note that in the future we expect to make changes to how long storage access will remain valid for. As mentioned before, the way to know that you will be able to use storage as a third-party going forward will be using the Storage Access API.</p> - -<h2 id="Debugging">Debugging</h2> - -<p>We encourage site owners to test their sites, particularly those that rely on third-party content integrations. We’ve added several new features to Firefox to make testing easier.</p> - -<h3 id="Developer_Tools_notifications">Developer Tools notifications</h3> - -<p>The <a href="/en-US/docs/Tools/Network_Monitor">Network Monitor</a> in Firefox Developer Tools now includes an indicator for all resource requests that have been classified as tracking resources. This indicator is shown as a shield icon in the domain column. In the sample image below, <code>trackertest.org</code> is classified as a tracking resource, while the request to example.com is not.</p> - -<p><img alt="network requests in Firefox devtools indicating which ones are tracking resources with a small shield icon" src="https://mdn.mozillademos.org/files/16181/Screen_Shot_2018-09-21_at_10.34.22_AM.png" style="border-style: solid; border-width: 1px; display: block; height: 57px; margin: 0px auto; width: 600px;"></p> - -<h3 id="Adding_custom_domains_to_the_Tracking_Protection_list">Adding custom domains to the Tracking Protection list</h3> - -<p>Curious how things will work if a third-party domain on your site were classified as a tracker? We’ve added a preference that allows you to add custom domains to the Tracking Protection URL classifier. To do so:</p> - -<ol> - <li>Type <code>about:config</code> in your address bar. If you are presented with a page that warns you "This may void your warranty!", click "I accept the risk!"</li> - <li>Right click on the next page and click "New" > "String".</li> - <li>For the preference name enter "urlclassifier.trackingAnnotationTable.testEntries".</li> - <li>For the preference value enter comma separated origins that you’d like to have classified as trackers. E.g. "example.net,example.org".</li> -</ol> - -<div class="warning"> -<p><strong>Warning</strong>: Be sure to remove these entries after you have finished testing.</p> -</div> - -<h2 id="FAQ">FAQ</h2> - -<p>This cookie policy has the potential to lead to site breakage, but has been designed to allow common third-party integrations to continue to work while preventing cross-site tracking. In this section we describe the functionality you can expect in different integration scenarios.</p> - -<h3 id="Will_this_storage_access_policy_block_ads_from_displaying_on_my_website">Will this storage access policy block ads from displaying on my website?</h3> - -<p>No — this feature only restricts access to cookies and site data that can be used to track users across websites. Blocking tracking identifiers does not prevent the display of advertisements.</p> - -<h3 id="I_use_a_third-party_analytics_service_that_is_classified_as_a_tracker._Will_I_still_receive_analytics_data">I use a third-party analytics service that is classified as a tracker. Will I still receive analytics data?</h3> - -<p>This depends on how the third-party analytics service is implemented. Third-party analytics providers will no longer be able to user their third-party storage to collect data. This means that providers using cookies which are scoped to their third-party domain, or local storage and other site data stored under their origin, will no longer have access to those identifiers across other websites.</p> - -<p>If these services are embedded into the main context of the page, they can continue to use first-party cookies and site storage to track users across page visits on that specific first-party domain.</p> - -<h3 id="I_use_third-party_services_for_social_login_like_and_share_button_integration._Will_my_users_still_be_able_to_make_use_of_these_services">I use third-party services for social login, like, and share button integration. Will my users still be able to make use of these services?</h3> - -<p>This depends on how the social integration is implemented. We expect that many of the popular social integrations will continue to function as they do under Firefox’s current cookie policy with some minor differences in the user experience.</p> - -<p>A social content provider that is classified as a tracker will not have access to their third-party cookies when the user first visits a new first party. Thus, the user may appear logged out to the service despite being logged in when they visit the provider’s website directly. Depending on the type of integration, the user may have to take some action to interact with the social content provider before the provider is given access to their cookies. For example:</p> - -<ul> - <li>For social login, the user may have to click a login button on the first party.</li> - <li>For social like or share buttons, the user will have to first interact with the button in a logged-out state. Once they do, many social content providers will prompt them to log in.</li> -</ul> - -<p>After these interactions, the provider will receive third-party storage access if they prompt the user in a way that is captured by the storage access activation heuristics described above. These providers should consider switching to explicitly request storage access through the Storage Access API as soon as possible. An <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1469714">initial implementation of this API</a> is currently available in Nightly.</p> - - - -<h3 id="I_use_third-party_pixels_and_other_tools_to_measure_the_effectiveness_of_my_ad_campaigns._Will_I_still_be_able_to_measure_the_conversion_rate_of_my_ads">I use third-party pixels and other tools to measure the effectiveness of my ad campaigns. Will I still be able to measure the conversion rate of my ads?</h3> - -<p>This depends on how the third party has implemented the measurement tool, but generally ad conversion measurement will be more difficult. Consider the following examples:</p> - -<ol> - <li>You run an ad on a social media website that is seen several times by a user, but never clicked. That user later visits your website, which includes a conversion tracking tag from the same social media website. This type of conversion is often referred to as a “view-through conversion.” Since the social media website does not have access to their third-party storage, they will not recognize the user as the same user that saw the advertisements on their website and the conversion will not be tracked. We expect that most view-through conversion tracking techniques will no longer work, including those offered by display networks.</li> - <li>You run an ad on a display network or social media website that is clicked by a user. That user lands on your website, which includes a conversion tracking tag from the same website that displayed your ad. This type of conversion is often referred to as a “click-through conversion.” Since the social media site or display network will not have access to their third-party storage, they will not recognize the user as the same user that saw the advertisements on their website and the conversion will not be tracked. We expect that this version of click-through conversion will no longer work.</li> - <li>You run an ad that appears on a social media website. A user clicks on your advertisement and is taken to a landing page that contains a conversion tracking tag from the third-party network. On the social media website, the network annotates the advertisement landing page URL with a query parameter that signals that the visit was the result of a click on an advertisement. On your website, the display network’s tag checks the URL query parameters and saves any ad tracking parameters to first-party storage. If a user later completes a conversion event, the network’s tag checks first-party storage to determine which click (or clicks) was responsible for the visit. We expect that click-through conversion implemented in this way will continue to work.</li> -</ol> |