This edition of this title is not available for purchase in your country. Choose an available edition from the options above
You've subscribed to ! We will preorder your items within 24 hours of when they become available. When new books are released, we'll charge your default payment method for the lowest price available during the pre-order period.
Update your device or payment method, cancel individual pre-orders or your subscription at
Your Memberships & Subscriptions
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

JavaScript: The Definitive Guide: Activate Your Web Pages (Definitive Guides) Kindle Edition

4.6 4.6 out of 5 stars 587 ratings

Since 1996, JavaScript: The Definitive Guide has been the bible for JavaScript programmers—a programmer's guide and comprehensive reference to the core language and to the client-side JavaScript APIs defined by web browsers.

The 6th edition covers HTML5 and ECMAScript 5. Many chapters have been completely rewritten to bring them in line with today's best web development practices. New chapters in this edition document jQuery and server side JavaScript. It's recommended for experienced programmers who want to learn the programming language of the Web, and for current JavaScript programmers who want to master it.

"A must-have reference for expert JavaScript programmers...well-organized and detailed."

—Brendan Eich, creator of JavaScript, CTO of Mozilla

"I made a career of what I learned from JavaScript: The Definitive Guide.”

—Andrew Hedges, Tapulous

Editorial Reviews

From the Author

My 10 Favorite Examples from this Book
The 6th edition of
JavaScript: The Definitive Guide includes 125 examples that you can view and download from from examples.oreilly.com/9780596805531/ or from github.com/davidflanagan/javascript6_examples
These are ten of my favorites from the book. Note that many of these use new features of ES5 or of HTML5, and will only work in the newest browsers:
1) Example 1-1 is is an extended example in the first chapter of the book, intended to show readers a simple but non-trivial example of JavaScript. This is the loan calculator example from the last edition, but made much more interesting with the addition of client-side graphics, localStorage, and Ajax.
2) Example 9-7 emulates Java-style enumerated types in JavaScript. It demonstrates that JavaScript's prototype-based inheritance is so flexible that factory methods can be normal object factories or even class factories. That example is a little clearer if you look at the code in Example 9-8.
3) Example 9-16 defines a class hierarchy of abstract and concrete Set classes. This one is a favorite because it involves data types and API design. Chapter 9 includes a number of other Set examples, too.
4) Example 9-23 demonstrates the ES5 Object.defineProperty() method and defines a convenient way to inspect and modify the attributes of the properties of an object. It may not be practical, but I think it is a beautiful hack.
5) Example 15-10 is a simple stream-like API wrapped around the innerHTML property of an element. When you're generating text (a table, for example) for display it is sometimes easier to pass each chunk that you compute to a write() method than it is to concatenate it all together and set it on innerHTML.
6) Example 21-03 is an analog clock implemented as an SVG graphic with scriptable hands. I love client-side graphics, and this is a favorite of mine because making the hands rotate is so simple with SVG transforms.
7) Example 21-06 draws a fractal Koch snowflake using the tag. I like it because it draws the same line over and over again, but uses transformations to make the line appear at different locations, orientations and sizes.
8) Example 21-13 is another graphical example: it draws sparklines (edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR). This one is a favorite just because sparklines are so cool.
9) Example 22-1 uses the HTML5 geolocation API to find out where you are then uses the Google Maps API to obtain a static map of your location. I like it because geolocation (via wifi networks) is just pure magic!
10) Example 22-15 is a long example that demonstrates the IndexedDB API. I like it because the idea of a client-side database in a web browser is crazy and cool. This one is really cutting-edge, but if you're running Firefox 4, you can try it out here: davidflanagan.com/demos/zipcodes.html

From the Back Cover

Since 1996, JavaScript: The Definitive Guide has been the bible for JavaScript programmers. With more than 500,000 copies in print, web developers are still raving about it:

  • "A must-have reference for expert JavaScript programmers...well-organized and detailed" -- Brendan Eich, creator of JavaScript, CTO of Mozilla
  • "I made a career of what I learned from JavaScript:The Definitive Guide"--Andrew Hedges, Tapulous
  • "The Definitive Guide taught me JavaScript"--Tom Robinson, cofounder of 280 North, cocreator of Cappuccino
  • "I know which parts of JavaScript matter, based on how crinkled the spine of my copy of The Definitive Guide is in that section"--J. Chris Anderson, cofounder of CoucheBase, Apache CouchDB committer, and author of CouchDB:The Definitive Guide
  • "...an indispensable reference for all JavaScript developers. If there's something I need to know about JavaScript, I trust The Definitive Guide will have the right answer for me. It's that good."--Rey Bango, Microsoft Client-Web Community Program Manager and jQuery Team member.

Product details

  • ASIN ‏ : ‎ B004XQX4K0
  • Publisher ‏ : ‎ O'Reilly Media; 6th edition (April 18, 2011)
  • Publication date ‏ : ‎ April 18, 2011
  • Language ‏ : ‎ English
  • File size ‏ : ‎ 5032 KB
  • Simultaneous device usage ‏ : ‎ Unlimited
  • Text-to-Speech ‏ : ‎ Enabled
  • Screen Reader ‏ : ‎ Supported
  • Enhanced typesetting ‏ : ‎ Enabled
  • X-Ray ‏ : ‎ Enabled
  • Word Wise ‏ : ‎ Not Enabled
  • Sticky notes ‏ : ‎ On Kindle Scribe
  • Print length ‏ : ‎ 2048 pages
  • Customer Reviews:
    4.6 4.6 out of 5 stars 587 ratings

About the author

Follow authors to get new release updates, plus improved recommendations.
David Flanagan
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

David Flanagan is a computer programmer who has spent much of the last 20 years writing books about programming languages. He now works at Mozilla. David lives with his wife and children in the Pacific Northwest, between the cities of Seattle and Vancouver.

Customer reviews

4.6 out of 5 stars
4.6 out of 5
587 global ratings

Customers say

Customers say the book covers a ton and provides in-depth coverage of the differences between ECMAScript3 and 5. However, some customers feel it's sadly out of date. Opinions are mixed on readability, with some finding it very well written and thorough, while others say it'd be a little boring and dense.

AI-generated from the text of customer reviews

5 customers mention "Scope"5 positive0 negative

Customers find the scope of the book to be extensive.

"...This book has no fluff. It's 1100 pages of pure, clean reference, pitfalls, strategies, and relative examples." Read more

"...There is good news and bad news. The good news is that it covers a lot of territory, many of the examples are excellent and some particularly tricky..." Read more

"...I feel that it does indeed cover a wide array of JS; practically everything I would ever need to reference, but the major reason why I reviewed the..." Read more

"...I haven't been through all of it.. because it's huge! this is a thick, heavy book full of great information...." Read more

4 customers mention "Detail"4 positive0 negative

Customers find the book provides in-depth coverage and great level of detail. However, some readers feel the book lacks clear explanations and concise code examples.

"...Once again author gives in-depth coverage, with many details about differences between browser implementations...." Read more

"...This dives deeper, and covers the material more completely." Read more

"...The thorniest points are covered clearly and thoroughly. THE book to read." Read more

"Great level of detail, but lacks clear explanations and concise code examples..." Read more

46 customers mention "Readability"26 positive20 negative

Customers have mixed opinions about the readability of the book. Some find it very well written, clear, and complete, with no fluff. Others however, say that JavaScript is not a simple language, and sentences can be dense with information. They also mention that the book is dry, boring, and very technical.

"...This book has no fluff. It's 1100 pages of pure, clean reference, pitfalls, strategies, and relative examples." Read more

"...about all O'Reilly books: It is too wordy, with too many explanations of obvious stuff. Fortunately, I've gotten good at skimming." Read more

"...This book was written before promises.The author is a good writer, perhaps even a great writer...." Read more

"A very well written reference...." Read more

3 customers mention "Relevance"0 positive3 negative

Customers find the book sadly out of date.

"This is a good Javascript book for ES5. However, ES5 is years out of date. ES6 is from 2015. This book was written back in 2011...." Read more

"As noted, it's sadly out of date..." Read more

"Old and outdated by 15 years..." Read more

This books covers a ton!
5 out of 5 stars
This books covers a ton!
I'm new to javascript and coding in general, this book goes through everything!I haven't been through all of it.. because it's huge! this is a thick, heavy book full of great information.If you're trying to learn more about Javascript and want detailed information about a variety of topics, get this book! also the format and organization is really friendly to the eyes, I don't have to look around the pages too much to understand what's being taught.
Thank you for your feedback
Sorry, there was an error
Sorry we couldn't load the review

Top reviews from the United States

Reviewed in the United States on February 24, 2014
I thought I had kept up with things since the last version. This book clued me in to new, simpler techniques becoming practical solutions only now - now that IE7 is so clearly on the way out.

Much of the book was re-written. There were a few issues that remained a bit elusive after reading the previous version (V5) and V6 cleared them up for me.

After studying chapter 15 on scripting documents, I stopped the press and made a number of important updates to my utilities file - streamlining functions that heavily supported IE 7. I changed a number of my websites to no longer support IE7 - this book gave me the information and courage to do so (the author did not suggest such a move, but it only made sense to me after getting myself up-to-snuff on the modern DOM). My code is now faster and leaner and much much much easier to follow (and debug if ever necessary) by using up-to-date basic dom methodologies such as:

A. Element.prototype to add some important/simple dom navigation methods to all elements (next(), previous() ..)

B. cssClass property to more easily, efficiently, and accurately deal with element classes (whereas I had a lot of code to do these functions and avoid RegExp for efficiency, now my methods simply pass cssClass with a simple RegExp as a fallback for IE8/9 which don't support cssClass. My perspective now is to NOT provide robust fallback for old IE, but only minimal anticipating users will make the jump from IE8 directly to IE 10/11 when their old PCs finally crap out (for those who use IE).

C. use of "data-" element attributes, which allow HTML to validate. I used to wrestle with confusing multiple classes to pass data so my html would validate - or I'd write special server / js scripts to attach data to elements as JS objects after the page loaded.

These examples aren't particularly the new sexy HTML5 initiatives, but without this book it might have taken me years to learn of them and to understand them enough to actually put them into play. And by the way, the book does a good job explaining the many HTML 5 initiatives - but I would first scan the pages to see if they were practical for my use and whether they were widely supported. But it's the small, detailed, practical things used in work-a-day scripting that makes this book so important to me.

I can't say this is a book for beginners only because of its length (1000+ pages) - but after learning JS on my own I wish I had read V5 of this book first as the others I read were all either somewhat outdated or too skimpy in important areas. This is really the only one that I read that goes into detail on the practical application of JS in client side scripting. It's the only JS book I use a reference.

My only criticism is that the book includes an entire chapter on jQuery (65 pages). I don't see the need for re-learning jQuery given browsers are moving along nicely toward standards compliance anyway. But the book would still weigh almost as much without the jQuery chapter.
7 people found this helpful
Report
Reviewed in the United States on February 24, 2014
If the world were ideal, there would be no crime, poverty, or JavaScript. Unfortunately, the world, being nonideal, has lots of those things, and so we must figure out ways to deal with them. I'm not sure about crime or poverty, but I am sure that one of the best ways to deal with JavaScript is to read this book. In it, David Flanagan does as superb a job as is possible with the mess that is JavaScript -- a language that was designed with one foot in the modern world and one foot in ancient Babylonia. (No, I take it back -- not even the Babylonians would have made so many design mistakes. But I digress, back to the book, which treats the material with which it must work in a most excellent manner.) If you have to read or write JavaScript, then you would be doing yourself a disservice by not reading this book from cover to cover. The only complaint I have about it is my universal complaint about all O'Reilly books: It is too wordy, with too many explanations of obvious stuff. Fortunately, I've gotten good at skimming.
One person found this helpful
Report
Reviewed in the United States on July 1, 2012
As a C#/C++ developer I bought this book to learn basics of JavaScript. I don't plan to develop Web apps, but because JavaScript effectively became 'the language of the web' it's nearly inevitable to know at least basic syntax and semantic of this language.

In my opinion, this book is the same to JavaScript as Bjarne Stroustrup's The C++ Programming Language to C++. The book is divided into 4 parts. First part is dedicated to core JS features. Writing style, depth of explanations, examples, all strongly resemble Stroustrup's book. Flanagan goes into great depth, he explains all problematic parts of JS itself (honestly JS syntax and semantic is sometimes bizarre) and differences between JS implementations. Especially the attention he pays to JS semantic 'quirks' (for instance automatic conversions of numbers, arrays, objects, string) that are so different to C-like languages was very useful for me. Also I like that sample programs didn't bother with any HTML code (the results are just written in comments). It's a great idea not to mix HTML and JS in these early stages of study. Only thing I didn't like was Chapter 6. I think author should have merged this chapter with chapter 9 and he could have presented object-oriented aspects of JS (especially prototype inheritance) together with the presentation of objects.

Second part is all about JS integration with web browsers. Once again author gives in-depth coverage, with many details about differences between browser implementations. Many samples contain utility functions that helps you to overcome these disparities. Chapter 19 contains good intro into jQuery and last chapter covers some new HTML 5 features like client side DB or Web Sockets.

Last two parts (about 300 pages) are JS references covering all important JS functions and classes. To be honest, this part of book was unnecessary for me. If you have Internet, you don't need this printed version of JS reference. It just makes the book thicker and heavier.

To sum up. JS The Definitive Guide is useful book for experienced developers who know some other object oriented language and want to learn JS. It's not the best IT book I have ever read but still it gave me good intro into JS.
8 people found this helpful
Report

Top reviews from other countries

Translate all reviews to English
David Morris
5.0 out of 5 stars Deep learning in JS
Reviewed in Canada on November 27, 2019
It filled in all the gaps in all other JS books I have.
Front to Back
5.0 out of 5 stars Most Comprehensive Guide
Reviewed in Australia on December 8, 2020
This is probably the most comprehensive guide that you can have if you are immersed in Javascript programming. Sites like StackExchange help a great deal find answers but if you want to need to fully understand language.
Akhilesh O.
5.0 out of 5 stars Five Stars
Reviewed in India on August 3, 2016
This is one of the best JavaScript book. Amazon service is really good.
Jürgen Scharfy
5.0 out of 5 stars Ausgezeichnet
Reviewed in Germany on December 15, 2014
Ein ausgezeichnet strukturiertes Buch. Ich bin noch lange nicht damit durch, aber bin schon längst davon begeistert. Mit (auch beruflicher) Erfahrung in vielen, teils "unmöglichen", Programmiersprachen bin ich vorrangig daran interessiert wie ich meine Vorstellungen nun in dieser, weiteren, Programmiersprache umsetzen kann um Web-Applikationen umzusetzen. Dazu muss man das "Ökosystem" der Sprache (und [X]HTML[4,5...]) kennen um seine Bedürfnisse optimal darauf abbilden zu können.
Zumindest alles was ich bisher gelesen habe, unterstützt mich darin wunderbar. Der Referenzteil in der hinteren Hälfte wird mir sicher gute Dienste leisten bis ich das notwendigste endlich auswendig weiß...

Folgende Themen werden abgedeckt:
Neben der üblichen Grundausbildung bezüglich [Control-]Statements und Datentypen, glücklicherweise Fokus auf Objektorientierung (Klassen, Prototypes, Konstruktoren, Vererebung, etc...) was bei JavaScript ja nicht zwingend nötig aber zum Glück möglich ist. Ein Kapitel über RegExp, div. Extensions und die beiden "Welten" Server- und Client-Side Javascript. Ebenso das Scripten Dokumenten (DOM) und CSS, sowie asynchrone Techniken zum Eventhandling wie Ajax und JSON. Cookies, Media (HTML5 canvas aber auch SVG)

Es sind auch Beispiele und Programm-Listings enthalten (auch mal etwas längere, die man meiner Meinung nach nicht vollständig abdrucken hätte müssen, ist aber zu verschmerzen )
One person found this helpful
Report
Gary Woodfine
5.0 out of 5 stars Probably the best programming book you'll ever buy!
Reviewed in the United Kingdom on August 1, 2014
I bought this book, along with 2 other titles "JavaScript: The Good Parts" & "Javascript Patterns", and all I can say is that this Trilogy is essential reading for any programmer.

These 3 books never leave my desktop! I have read them all cover to cover, Something I have never done with any other programming books I have ever bought. My bookshelf is littered with Half read, flicked through tomes of regret.

I can honestly say, that getting to understand the worlds most misunderstood programming language has probably been the most enjoyable experience of my programming career!

This tome is a lofty read, weighing in at a 1018 pages, it takes some doing to get through, but I can promise you, if you have been working with Javascript for a while, you are going to experience many epiphanies!

I admit as a cover to cover read, it is hard going, but it was the growing interest and the desire to learn more about the language that kept me going. I definitely feel, that after reading all three books my Javascript skills went through the roof!

The authors, style makes this book very approachable, which is a change from a majority of the programming books out there. Most books are either way too academic or far too dumbed down. I feel the author got it just right!
23 people found this helpful
Report

Report an issue


Does this item contain inappropriate content?
Do you believe that this item violates a copyright?
Does this item contain quality or formatting issues?