最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

browser - javascript is enabled in ALL webbrowsers by default? - Stack Overflow

programmeradmin1浏览0评论

Isn't JavaScript enabled in all webbrowsers by default?

if yes, does this mean that i can use Ajax/JavaScript in my webpages without bearing in mind that maybe some browsers wont be able to use my website?

I don't want to create another version of the page to display non JavaScript content.

what do you think?

EDIT: it doesn't seem that gmail is working with JavaScript disabled. and SO works bad with it disabled:)

Isn't JavaScript enabled in all webbrowsers by default?

if yes, does this mean that i can use Ajax/JavaScript in my webpages without bearing in mind that maybe some browsers wont be able to use my website?

I don't want to create another version of the page to display non JavaScript content.

what do you think?

EDIT: it doesn't seem that gmail is working with JavaScript disabled. and SO works bad with it disabled:)

Share Improve this question edited Feb 19, 2017 at 16:55 Peter Badida 12.2k10 gold badges50 silver badges96 bronze badges asked Dec 6, 2009 at 9:58 never_had_a_namenever_had_a_name 93.1k105 gold badges277 silver badges391 bronze badges 1
  • Did you try gmail's html view? – Kobi Commented Dec 6, 2009 at 10:18
Add a comment  | 

6 Answers 6

Reset to default 13

No, you cannot assume that javascript is enabled.

Yes, JavaScript is enabled by default in mainstream web browsers.

But quite apart from making your site work for users that are more security-conscious than most and turn it off, you will want it to work in things other than mainstream web browsers, such as accessibility tools and search engines. Hide all your content so that it only appears with JavaScript or Flash and you're not going to be coming up very high in Google.

i dont want to create another version of the page to display non javascript content.

This is why you create one version, as plain HTML, then add the progressive enhancement sauce.

Usually it is enabled, but users can disable it or there may be some corporate policy to not allow certain user groups or machines to run javascript in browsers. It is always better to include <noscript> warning or message to tell the user that page will not work without js.

isnt javascript enabled in all webbrowsers by default?

All browsers? No, although it is in the majority.

However, users turn it off. System administrators turn it off. People install the NoScript plugin. It isn't guaranteed to be on.

Most people care about bots (such as the GoogleBot indexer) being able to access their content too, they don't support JS.

if yes, does this mean that i can use ajax/javascript in my webpages without bearing in mind that maybe some browsers wont be able to use my website?

No.

i dont want to create another version of the page to display non javascript content.

Build on things that work

Generally, Yes. Certain settings might not allow this or the person has opted to disable it all together. But I would ask yourself if your'e ok with losing some possible visitors due to a lack of javascript support. If the site is as such that it needs to service all, then you will probably need create fallback methods to handle non-javascript use.

Javascript would NOT be enabled by default in a text-mode browser such as Lynx

Strictly speaking this answers your question in the negative, but you may wish to ignore them, because it's a tiny segment of the browser market.

发布评论

评论列表(0)

  1. 暂无评论