简体   繁体   中英

Send JS script from NodeJS server to client a execute it, the client cannot see JS script

I want to send JS script from NodeJS to a client and execute it in such a way that the client does not see the JS script. Can I do it this way?

  1. generate some JS script on NodeJS server

  2. send JS script to client

  3. execute JS script on client-side

But with a little detail the client cannot see the JS script.

Probably you can use eval(response.data) to run your response from the nodejs server. Even if client cannot see the script in the contents .. it will be on the network calls tab.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM