简体   繁体   中英

Res.render method - express and ejs

Newbie questions. Am I right that res.render() is for serverside rendering and res.send() is for client side rendering? Or I just dont understand this two concepts (I mean server side rendering and client side rendering)? If not, it is even possible to do boty things using express and ejs?

res.render does serverside rendering (it fills a template with content). What you do with res.send is up to you. But actually every content you send is rendered (displayed) on the client side, thats what the web is all about.

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