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

172
Visualizações
Html script type "x-custom-template", is this a naming convention or am I free to use anything I want (in a good practice sense)?

I came across this question: Defining a HTML template to append using JQuery where the accepted answer uses "x-custom-template" as script type.

After some searching I found out in the following question: What's the difference between using <script type="text/x-custom-template"> and <script type="text/template">? where the accepted comment pointed out that

The use of an invalid MIME type as the value of the type attribute of a (both text/template and text/x-custom-template are invalid REF) is used specifically to prevent the browser from trying to interpret the contents of the tag as JavaScript code (and subsequently throwing a runtime error due to bad JavaScript syntax.). So this basically allows you to put anything inside the script tag for future reference.

Now my question is, is this "text/x-custom-script" a "naming convention" that is very widely used for the purpose and it's a bad practice to use something like "text/no-javascript" to achieve the same effect, or it's just a minority of people that uses "x-custom-script" and I can use basically anything I want and is still a good practice.

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