Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!