To get information from card readers these are available options
1-ActiveX (not recomended)
ActiveX component that loads inside internet explorer and contains
API’s that can be consumed using JavaScript code
it is only supported in IE browser and Microsoft stops support for internet explorer that
mean IE will die in a short time
2-Applet (not recomended)
- Develop an applet that communicates with the local device and interact with the applet using javascript
- Require to configure java run time in the browser.
3-Create host application that runs locally to communicate with devices and send a response to the browser over a web socket (recommended)
- This method is preferred since the web socket is supported by all browser versions and didn’t require any extra configuration
- Also inside the host application you can execute any complex operation without any limitation.
- I have attached a sample for host application C# sample on this repository