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

121
Views
What can cause the browser 'load' event to not fire?

I have a bug where the javascript 'load' event is not firing. This only happens when I navigate to code that goes through php however when I navigate to an html file it works fine.

'load' Event in the browser DOES trigger

test.html

<!DOCTYPE html>
<html lang="en-US">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <script>
            // Show all events that have fired
            Object.keys(window).forEach(key => {
                if (/^on/.test(key)) {
                    window.addEventListener(key.slice(2), event => {
                        console.log(event);
                    });
                }
            });
        </script>
    </head>
    <body>
    </body>
</html>

'load' Event in the browser NEVER fires

app.blade.php

<!DOCTYPE html>
<html lang="en-US">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <title>{{ config('app.name', 'Laravel') }}</title>

        {{-- Fonts --}}
        <link rel="stylesheet" href="https://rsms.me/inter/inter.css">

        {{-- Styles --}}
        <link href="{{ mix('/css/app.css') }}" rel="stylesheet" />

        {{-- Scripts --}}
        @routes
        <script src="{{ mix('/js/app.js') }}" defer></script>
        <script>
            // Show all events that have fired
            Object.keys(window).forEach(key => {
                if (/^on/.test(key)) {
                    window.addEventListener(key.slice(2), event => {
                        console.log(event);
                    });
                }
            });

        </script>
    </head>
    <body>
        @inertia
    </body>

</html>

I use laravel sail in WSL2.

Things I've tried:

  • turning it off and on again
  • testing in edge, still occurs
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This ended out being a conflict with an IPV6 address.

I listed the processes running on IPv4 and IPv6 and spotted both of these protocols were attempting to use localhost on port 80.

I ran the kill command on the IPv6 process and the browser started behaving correctly.

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!