Unfortunately, there is no general answer. You need built-in components to detect Bluetooth beacons on Android and iOS. Web browsers on both operating systems do not have hooks for detecting beacons via JavaScript or HTML.
Chrome OS has Bluetooth bindings in the Chrome browser, which may allow you to create a web application in Chrome OS that will do this. But it really will be a Chrome application, not a general-purpose web application.
The Chrome browser for iOS and Android also detects Eddystone-URL beacons, but it does not transmit discovery information to the web application. Detections are sent to the user as a notification, and clicking on this notification simply calls up the configured URL in the Chrome web browser. This does not allow the behavior of a dynamic web application based on beacon detection.
source
share