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

215
Visualizações
Issues with browser compatibility and Save As action on <a href=""> click

There is a basic difference between browsers on Windows and Linux( Ubuntu 22.04 ) operating systems.

Default behavior on Windows (clean installation) is that files are automatically downloaded in Download folder.

Default behavior on Linux ( clean installation ) is that Save As dialog is raised. Default Ubuntu 22.04 Save As Chrome

Yes I'm aware that you can configure your browser and enable the feature on Windows operating system. But from UX perspective that is one step too many.

Is there a way to programmatically raise the Save As dialog. For instance this is a snippet that generates a link with few of the options tested:

download(url, downloadName) {
    const a = document.createElement('a');
    a.href = url;
    a.style.display = 'none';
    // a.download = '';
    a.download = downloadName;
    a.target = '_blank';
    a.type = 'application/unknown';
    document.body.appendChild(a);
    a.click();
    document.body.removeChild(a);
    window.URL.revokeObjectURL(url);
  }

Best regards

about 4 years ago · Juan Pablo Isaza
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