chump2877
08-22-2007, 05:07 AM
In my experience so far with ASP.NET, and as a JavaScript programmer, I have noticed that ASP.NET's "AutoPostBack" feature/property does not degrade particularly well if JavaScript is manually disabled in a JavaScript-capable browser (like IE7, FF, or any modern browser).
The only (albeit ugly) solution to this problem that I've heard of so far is to provide at least one Button control on a page with ASP.NET controls that utilize the AutoPostBack feature.
I have some issues with this solution.
This is not really "graceful" degradation of JavaScript (JS). In my opinion, a "graceful" degradation would involve the automatic and imperceptible delivery of different user experiences (depending on whether JS is available), without the user ever knowing that he/she is being delivered a unique experience. The idea is that a JS-user need not know about a non-JS user's experience, and vice versa. Thus, the addition of a Button control explicitly for use by non-JS users seems to be a clumsy solution (since the button is also visible to users who have enabled and are using JavaScript).
In short, I don't see a way to hide this button from browser users that have JS enabled. ASP.NET can detect if a browser supports JS (and, while this feature is serviceable, maybe it is not always reliable? -- which is potentially an even larger problem), but ASP.NET web applications do not appear to degrade well in the event that JS is disabled in a browser that supports JavaScript. Ideally, it would be nice if there was a way to bypass ASP.NET's "browser sniffing" techniques altogether (in this situation), and simply offer a simultaneous, alternate experience to non-JS users (without the browser detection).
Does anyone know of a solution to this problem that truly degrades gracefully?
Thanks.
The only (albeit ugly) solution to this problem that I've heard of so far is to provide at least one Button control on a page with ASP.NET controls that utilize the AutoPostBack feature.
I have some issues with this solution.
This is not really "graceful" degradation of JavaScript (JS). In my opinion, a "graceful" degradation would involve the automatic and imperceptible delivery of different user experiences (depending on whether JS is available), without the user ever knowing that he/she is being delivered a unique experience. The idea is that a JS-user need not know about a non-JS user's experience, and vice versa. Thus, the addition of a Button control explicitly for use by non-JS users seems to be a clumsy solution (since the button is also visible to users who have enabled and are using JavaScript).
In short, I don't see a way to hide this button from browser users that have JS enabled. ASP.NET can detect if a browser supports JS (and, while this feature is serviceable, maybe it is not always reliable? -- which is potentially an even larger problem), but ASP.NET web applications do not appear to degrade well in the event that JS is disabled in a browser that supports JavaScript. Ideally, it would be nice if there was a way to bypass ASP.NET's "browser sniffing" techniques altogether (in this situation), and simply offer a simultaneous, alternate experience to non-JS users (without the browser detection).
Does anyone know of a solution to this problem that truly degrades gracefully?
Thanks.