Generalization will limit career and compensation eventually. There will be a point where the market will have a glut for general skillset.
Specialization, on the other hand, usually leads to higher compensation and valuable skillset.
This does not mean that Specialist can't be Generalist. It could be that Specialist was once Generalist and get bored :).
By 2012-2014, the landscape of web development has not changed drastically so if a Generalist stops doing what he/she did and chose to be a Specialist from 2014-2018 (say, in Storage design, Distributed Systems, Machine Learning, or AI), that doesn't mean he/she can't go down to the product/web layer and contribute: it's still MVC doing CRUD backed by MySQL/PostgreSQL and with a touch of some client-side stuff.
I’ve noticed people tend to specialize at larger places, and not everyone wants to go deep rather than wide. Startups are a super easy way to optimize for a wider skill base, albeit at a sharp cost of depth.
YMMV, but it depends on the type of education you value.