12.07.2015 Views

Pro JavaScript for Web Apps pdf - EBook Free Download

Pro JavaScript for Web Apps pdf - EBook Free Download

Pro JavaScript for Web Apps pdf - EBook Free Download

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 2 GETTING STARTED...This combination of elements redirects the user to a page called noscript.html, which is an HTMLdocument that tells the user that I require <strong>JavaScript</strong> (and, obviously, doesn’t rely on <strong>JavaScript</strong> itself).You can find this page in the source code download that accompanies this book and see the result inFigure 2-5.Figure 2-5. En<strong>for</strong>cing a <strong>JavaScript</strong>-only policy in a web appIt is tempting to require <strong>JavaScript</strong>, but I recommend caution; you might be surprised by how manyusers don’t enable <strong>JavaScript</strong> or simply can’t. This is especially true <strong>for</strong> users in large corporations,where computers are usually locked down and where features that are common in the generalpopulation are disabled in the name of security, including, sadly, <strong>JavaScript</strong> in browsers. Some web appsjust don’t make sense without <strong>JavaScript</strong>, but give careful thought to the potential users/customers youwill be excluding be<strong>for</strong>e deciding that you are building one of them.• Note This is a book about building web apps with <strong>JavaScript</strong>, so I am not going to maintain progressiveenhancement in the chapters that follow. Don’t take that as an endorsement of a <strong>JavaScript</strong>-only policy. In my ownprojects, I try to support non-<strong>JavaScript</strong> users whenever possible, even when it requires a lot of additional ef<strong>for</strong>t.41www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!