Is it worth it to code different functionality for users with javascript disabled?

后端 未结 12 915
一整个雨季
一整个雨季 2020-12-28 15:53

I\'m currently building a project and I would like to make use of some simple javascript - I know some people have it disabled to prevent XSS and other things. Should I...

12条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-28 16:40

    I am one of those that uses 'No-Script.' And I can tell you that sites that use javascript and don't work without it enabled is extremely annoying, stackOverflow... No we don't expect it to be very fancy, if I upvote load a new page that says "Thank you."

    We expect to be able to use the site with reasonable limitations, don't ever display a page that says JS must be enabled, though, even if the site is crap without it. And yes if your site convinces us to stay we will enable. A function that isn't in common use on the site can also require javascript.

    Please note that your site should also look good with no JS or CSS, if nothing else it is good for Bots.

    As others have pointed out some phones don't have JS, this is changing but another good reason to have reasonable non-JS. I suggest code with non-JS and add JS after the former works, there are good ways where JS can work with the non-JS layout.

提交回复
热议问题