Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

139
Visualizações
Transfer content from one tab to another without browser extension possible?

I have a Chrome browser tab with a textarea filled with some ASCII content. I want to open a new tab, load a special URL, where is a HTML document with an empty textarea, and transfer content from the textarea in the first tab to the textarea in the second, newly opened tab.

My question: Is it possible without a browser extension?

Edit: all data are placed in the same domain and server, both are mine, like this:

  • First tab is located under https://tab1.my.domain.com
  • Second tab is located under https://tab2.my.domain.com

phpinfo: enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

So for PHP you both need to make your settings wildcards (or w\e permissions you want) Vs standard init sessions (applies to cookies too) to allow domains to access other subdomains cookies.

session_set_cookie_params(0, '/', '.domain.com', true);
session_start();

Also for any JS ajax request you'll need to enable xhr credentials / cross domain.

            $.ajax({
                type: method,
                url:  url,
                data: request,
                contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                traditional: true,
                crossDomain: true,
                xhrFields: {
                    withCredentials: true
                },
                success: function (data) {
                    ...
                },
                error: function (xhr, status, thrown) {
                    ...
                }
            }); 

Neither PHP or JS natively "like" CORS requests these days, even from the same subdomains. They have to be explicitly enabled.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda