3 ms·
I work on an enterprise platform where I have client side access, but no server side access. My only options for injecting HTML are: 1) cross domain AJAX via C
by grimtrigger 14y ago
I work on an enterprise platform where I have client side access, but no server side access. My only options for injecting HTML are:
1) cross domain AJAX via CORS
2) Injecting HTML strings constructed in JS
For small amounts of HTML, I'd much rather go with option #2.
ps. Its unfortunately very common for developers to have little or no server side access to the applications they're building.
- crescentfresh 14y agoWait, are you rolling up all client templating libraries into 2) or something?
- grimtrigger 14y agoMy understanding of "client templating libraries" is that they sit on the server, and create code that will be delivered to the client. For example moustache. If you can easily avoid a call to the server, it might be a good idea.
- bsimpson 14y agoClient side templating libraries like Handlebars do in the browser what server side libraries like Jinja do in the cloud. You've described server-side libraries. Client-side do the exact same thing in JS on the client.