DEV Community

Discussion on: Why Many Web Developers Are Obsessed With CSS-Only Things?

Collapse
 
zakirsajib profile image
Zakir Sajib

in 2011, i was working in newspaper media as a web developer, i had to built a event plugin in wordpress platform. Whole thing was built in js and little bit CSS ofcourse. so if no js in browser then no events calendar are shown. My Team lead shouted in front of all my colleagues why I did I build that in only js. No I didn't lose the job, but he embarrassed me. And I couldn't fix it to allow only css based solution, it requires js to show up events calendar and data using json. I didn't know!

Anyways lesson learnt: Use JS only required, think your audience, our audience mostly elder people who might have older machine, and may be js was disabled or outdated. We can't tell them use latest browser and enable or update js or whatever, simply we don't have any control on their machine.

So never use JS for critical data to show up, use JS only for if really needed or animation or interaction (Critical data shouldn't be hidden just because you use JS).

He was right and I was wrong, In 2011, I was not bothered about elder people. Now I think twice before i touch my hands on keyboard.