• Single-Factor Authentication
  • Two-Factor Authentication (2FA)
  • Token authentication (2FA using purpose-built physical device)
  • Biometric authentication
  • Behavior biometrics e.g. keystroke dynamics, voiceprints
  • Multi-Factor Authentication (MFA)
  • Password Authentication Protocol (PAP)
  • Challenge Handshake Authentication Protocol (CHAP)
  • Extensible Authentication Protocol (EAP)
  • Single Sign-On (SSO)
  • Certificate-based authentication
  • Transaction authentication
  • Computer recognition authentication (Fingerprinting)



By using natively availableperformance APIs:

.filter(p => 'nextHopProtocol' in p)[0]
.nextHopProtocol // 'h2'

By using the deprecated loadTimesAPI:

window.chrome.loadTimes().wasFetchedViaSpdy; // true window.chrome.loadTimes().npnNegotiatedProtocol; // 'h2' window.chrome.loadTimes().connectionInfo; // 'h2'

The deprecation notice can be read here: https://chromestatus.com/feature/5637885046816768

Feature Flag

If you’re in an older machine OR browser, then go to chrome://net-internals/#http2 and open the network observation component, and select HTTP/2

View gist: https://bigfatsoftwareinc.wordpress.com/2022/04/16/how-to-determine-if-the-site-uses-http2-chrome/

Originally published at http://bigfatsoftwareinc.wordpress.com on April 16, 2022.



In the image above, both operations are identical.


Internally, when you try call the toString() method on an Array, it simply delegates the job to the Array's native join() method, which then recursively calls join() & hence, flattens the array out, giving you a finely printed flattened array.

However, unlike the new flat() method, it doesn't return an Array. It simply returns you a string.

About Efficiency

You may ask, whether this approach is efficient?
I’d say — Well, it is not inefficient.

Internally, the flat() method does a couple of more checks than the join() method but none of them add any overhead of time complexity.

Plus and the join() method is a very generic one.

This would also mean that flat() will be a more reliable function if you want to do some serious operations.

Originally published at http://bigfatsoftwareinc.wordpress.com on April 13, 2021.