This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Does HTML5 require clients to support JavaScript?
Would HTML5 API's work when Javascript is disabled in the web browser? Or after HTML5 becomes standard is it true that we would no longer be able to disable Javascript?
I wrote a dummy chrome extension, that uses javascript to display a alert window.
This still works when I disable javascript, which I thought would disable it. Shouldn't it? Or am I missing something?
It depends on what you mean by "HTML5 API".
If you mean it as the DOM hooks into different elements, such as video.play(), then yes, you'll need JavaScript enabled to use those features.
If instead you mean it as the new features of HTML or CSS such as input[type="email"] and the :valid pseudo-selector, then no, you wont need JavaScript enabled to use those features.
Most of the new HTML5 features are targeted towards improving the interactivity and usability of the web. Any user who decided to disable JavaScript does so with the understanding that they are disabling the vast majority of web interactivity.
For a developer, this means that the interactions should be layered on top of a solid foundation of quality content and data. If the user has JavaScript enabled, then they get the flashier, easier to use interface. If the user has JS disabled, then they get the generic static content replacement.
Related
This question already has answers here:
How to handle JavaScript being disabled in AngularJS
(2 answers)
Closed 8 years ago.
I have learned angular.js, and it's awesome , i'm impressed. i want to use it in my website, but what if our some of user has disabled JavaScript on there browser, they should still gonna see my website content ?????. i'll appreciate your help.
In most cases when js is required, you should add noscript which will be displayed when js is disabled. In that tag you need to warn user that he/she should enable js.
In addition to other answer, I am quoting from Angular book:
Not everyone’s browser supports JavaScript. Let everyone see all of your content and use your app without needing to execute code in the
browser.
The world has changed since these concepts were born. Point #1 is no
longer true for any interesting population. If you’re running a
browser without JavaScript, you’re rele‐ gated to sites created in the
1990s
Or make a div with a warning/notice text (maybe in center of page), and hide that div in js (first thing in your code)
So, if the user does not have js enabled, they will see the nice warning
I have heard that HTML5 uses some sort of javascript within... Does CSS3 also does that, I don't think the transitions can work otherwise..
Reason of asking, I don't want any javascript in my CSS part.. I am trying to build a pure css library like pureio and bootstrap, they both contain javascript also although..
HTML5 doesn't have any javascript within as such.
Some new elements when implemented by the browser may however have some of the HTML5 features rendered using JS or at least provide a JS API as per specification.
Like any other HTML version prior that, otherwise we wouldn't be able to bind events or control HTML elements via Javascript.
And for CSS no, of course not there is no JS dependencies. How would CSS work when JS is disabled?
And remember browsers have access to the all computer power. It wouldn't make a lot of sense to ignore that and do everything in Javascript.
I have been using modernizr with javascript to decide whether css transitions is available, but is there a way to check if css transitions are working, without using javascript?
I think the only scenario where that would make sense is a browser without CSS animation support and with JS disabled. There you could display some message like "Please upgrade your browser or enable JS."
You could try server-side UserAgent sniffing there, but I wouldn't recommend it. First of all, it's not reliable and second it's simply not worth the effort. Anyone using such a browser is used to limited functionality.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to detect if JavaScript is disabled?
Is it possible to detect whether javascript has been disabled if so redirect to another page?
My application is being developed with JSPs, as I am using a lot of fancy javascript stuff in my application.
Thanks in Advance
Dean
You can use the <noscript> tag:
http://www.boutell.com/newfaq/creating/detectjs.html
Know this is an old thread, but just thought it add my own solution. I have javascript controlled <div> and on a browser where javascript is disabled, none of these are show so:
Have a standard <div> in center of page saying “please enable javascript to view or click here for non javascript page”
Set the z-value to -1
Have all javascript controlled <div> and set with a white/whatever background and a z-index value to 0 or higher
The javascript controlled <div> will cover the message if enabled, and show it if not.
Hope that this gives one or two of you a few ideas. Although this was specifically for my site, you may find that thinking out the box may help you too.
I'm learning jQuery and am about to write some pages using intensively that library. I just learned that some user disable JavaScript on their browser (I didn't even know that was possible and/or necessary).
Now, here's my question: What happens to my web application if a user disable JavaScript? For instance, I'd like to display some screens using AJAX and commands such as 'InsertBefore' to bring in live a DIV that will display the result.
So, if JavaScript is disabled, I wonder what going to happen to all this work that relies on JavaScript?
I'm kind of lost.
Thanks for helping
You may want to start by reading on Progressive Enhancement and Unobtrusive JavaScript.
I would also suggest to investigate how popular rich web applications like GMail, Google Maps and others, handle these situations.
I just learned that some user disable javascript on their browser
I do. The "NoScript" plugin for FireFox does the trick.
So, if Javascript is disabled, I wonder what going to happen to all this work that relies on Javascript?
It won't be functional.
A good practice suggests designing a site not to rely on JavaScript for major functionality. At least, accessing its content (in read-mode) should be possible. JavaScipt should only add interface enhancements like Ajax techniques etc. But the fallback version should always work.
I feel really sad when I see a site which is completely broken without JavaScript. Why can't people use CSS to put elements in proper places? Why do they try to align elements with JavaScript even if there is no dynamics involved?
The same goes for Flash sites. Once in a while a land upon a "web-design-agency" site which makes picky comments about me not allowing JavaScript. When I do I only see a basic primitive site with a few menus and that's it. What was the point of using Flash when the work is so primitive it can be done with raw HTML and CSS in an hour? For me it's a sign of unprofessional work.
All what's done in JavaScript won't work. Some users disable it for security reasons, NoScript is an excellent example. You can try it yourself by removing the scripts from your page or installing the NoScript-plugin for Firefox.
As a rule of thumb:
Make the website working with only semantic HTML
add the CSS
add the JS
But the website should be (almost) fully functional in stage 1.
If you disable Javascript in Safari things like Lexulous in Facebook won't work properly, the mouse letter carry function doesn't work.