5 second (pending) assets when using BrowserSync

I recently started a new Trellis project, using bedrock as well, and noticed that assets were loading slowly and that when CSS was injected with BrowserSync, it would take 5 seconds for them to show after the initial notice (and compilation) had taken place.

The only configuration option that shows 5000 as an option is the Socket heartbeatTimeout https://browsersync.io/docs/options#option-socket.

So what are the differences between the current Trellis version 0.9.9 and the previous 0.9.8 that might cause this? https://github.com/roots/trellis/blob/master/CHANGELOG.md

I’m thinking it might be a web socket issue with NGINX.

After much research, I can confirm that it was because I was using a .local TLD for development. Apparently, OSX uses that TLD for Bonjour services resulting in strange behaviour. I couldn’t use .dev due to Chrome 53+ highlighting ICANN issues (even seemingly with the hosts file changed).

2 Likes