displaying charts in browser while keeping data safe

后端 未结 2 1932
小蘑菇
小蘑菇 2021-01-28 00:40

I have recently been exploring the different options for displaying charts in a browser.

I have tried using the d3js library, google charts, java applets an

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-28 01:05

    The simple answer is that you can't. The code is run directly by the browser, so the user can see it, and the same for the data.

    The slightly more complicated answer is that you could try to encrypt/obfuscate your data, but even then the user will be able to get to it with some effort, as the same comment I've made above still applies.

    In short, if you don't want the user to see it, don't send it to the browser. You could, for example, generate visualisations as images on the server and have the browser download only the image.

提交回复
热议问题