Should you design websites that require JavaScript in this day & age?

后端 未结 30 1459
醉酒成梦
醉酒成梦 2021-01-11 11:04

It\'s fall of 2008, and I still hear developers say that you should not design a site that requires JavaScript.

I understand that you should develop sites that degra

30条回答
  •  情歌与酒
    2021-01-11 11:38

    You should design websites with Javascript in mind--but not implemented. Consider, build it where every click, every action, performs a round trip to the server. That's the default functionality for older browsers, and those without JS turned on.

    Then, after it's all built, and everything is working properly, add in JavaScript which hijacks the link, button and other events, and overlay their standard functionality with the Javascript functionality you're wanting.

    Building the application like this means that it will ALWAYS work, which ultimately is what you're wanting.

提交回复
热议问题