javascript is enabled in ALL webbrowsers by default?
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: i开发者_运维百科t doesn't seem that gmail is working with JavaScript disabled. and SO works bad with it disabled:)
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.
精彩评论