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

181
Views
The async attribute is ignored if the <script> tag has no src?

The async attribute is ignored if the tag has no src? Because defer is, but i cant fin information about async.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This attribute affects javascript fetching. If you have no src there is nothing to fetch.

Also you can do a simple test to check how it works. Spoiler: it doesn't do anything as expected.

<script>
  console.log("sync 1")
  console.log(document.getElementById('test') != null)
</script>

<script async>
  console.log("async")
  document.write('<div id="test"></div>')
</script>

<script>
  console.log("sync 2")
  console.log(document.getElementById('test') != null)
</script>

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