Hacker News new | ask | show | jobs
by mrozbarry 1919 days ago
There are pros and cons to highlighting on the client vs the server.

If you highlight on the server:

pros: no javascript, can cache

cons: might be a way to inject scripts into everyone's browser, since the client has to trust the html from the server

--

If you write it on the client:

pros: server can't distribute injected scripts, server stores less things

cons: more javascript, every client has to do work

--

All software choices are weighing the pros and cons. Do the thing that lets you work quickly and safely.