Why don't we use always JS there instead of this server side code?