📜 ⬆️ ⬇️

Safari for web developers

Last summer, Apple announced a new version of its Safari browser. The surprise was that this browser works not only under Mac OS, but also under Windows XP / Vista. This fact made it possible first of all for web developers to familiarize themselves with the browser and test their developments in it, without being able, like me, to work on Apple computers.
At the moment, this browser is in beta testing, and is available to everyone to download . All of us have already read statements about the fact that Safari is the fastest, but this causes conflicting opinions. Although I want to note that in your own tests, often Safari comes first. But speed, the browser, though important, is not a priority. As web developers, it is important for us to know what the browser is, what is supported in it, and what is not. In this regard, this browser only pleases. It supports standards as well as FF and Opera. Of course, there are some flaws, but who has none? It turns out that everything that works in FF and Opera also works in Safari. It is rarely seen any glitches, the feeling that bugs happen more often in other browsers - but this is subjective. It is also worth noting that Safari is in the forefront, and many of the chips were first introduced precisely in it, for example, the same <canvas>.
Until recently, it seemed to me that the browser is trying to make it more stable, because they do not release it. It was strange that for more than six months the release could not take place. However, the other day I came across an interesting blog , where innovations are described. It turns out so far in the browser introduce new functionality. No, not new tabs and settings, but exactly the functionality that web developers can use. Many things are still being tested, and are only available in nightly builds.

What we are prepared:
  1. Now getElementsByClassName is supported , what appears in FF3. As in FF, this method is tens of times faster than XPath, and hundreds of classic DOM algorithms.
  2. Safari will now have the W3C Selectors API , which means the availability of the querySelector and querySelectorAll methods . So framework developers will not need to reinvent the wheel, and native support for these methods is also much faster than any implementation.
  3. Finally, they fixed a significant number of errors and flaws, so it became possible to create the so-called Rich Text Editors. Editors such as WordPress, Google Docs, GMail, Blogger and others are currently supported (in the sense of working). Libraries such as TinyMCE and FCKeditor are also supported. As for others, it is a matter of time. The main thing is that WYSIWYG editors are now a reality.
  4. SVG support, and at a very good level. So good that for some tests it is the fastest browser. Opera is in second place (~ one and a half times slower), and FF is in fifth (three times slower).
  5. Support for XPath and other XML technologies such as XSLT has been added, and the processing of the XML itself has become faster. JavaScript added XSLTProcessor API, DOMParser API, XMLSerializer API. Improved support and compatibility of XMLHttpRequest, it began to support more HTTP methods, parse more XML MIME types, support event listeners, etc.
  6. Add-ons and extensions in CSS. Quite a lot of new things in CSS3 have already been implemented in Safari. For example, multiple backgrounds (when you can specify multiple background images for a single block, this is the only browser with this capability), background-origin, background-clip, text-shadow, rounded corners of blocks (-webkit-border-radius), columns (available as the -webkit- extension, the same support exists in the FF as the -moz- extension), new layout properties (the same as the extensions, the same in the FF). There are several in-house “inventions” such as -webkit-text-fill-color (text fill color), -webkit-text-stroke (text stroke), -webkit-box-shadow (block shadow). But more attention should be paid to CSS animation and CSS transformation . If the former still seems controversial, then the latter will be appreciated by many, since the block can now be rotated, twisted, compressed, and even used its matrix for transformation.
  7. Support for new HTML5 tags, such as <video> and <audio>, along with the corresponding API.
  8. Initial client-side database support . Who would have thought about this five years ago? HTML5 has a section on client-side database storage . Safari started to implement it. Development tools already have some interface for viewing local databases.
  9. New tools for developers Web Inspector and Drosera . The first is intended to review DOM, CSS, attached files, download speeds, etc. The second is to debug javascript.

And it seems to me that this is not the whole list.

On top of that, recently (January 15th) they posted reference materials on what Safari supports and how. You can learn how to support CSS , HTML , DOM . I think that many of these materials will be useful, despite the fact that some sections have not yet been completed, but there is enough useful information. Also, it may be useful page for web developers on webkit wiki

Thus, Safari promises to be a pretty promising browser. Today it is not inferior to the direct competitors of FF and Opera, and in what is even superior. Preferences and popularity is the second thing, the main thing is that we get a good product with which you can work, under which you can create web applications and rich sites. We are waiting for release.

')

Source: https://habr.com/ru/post/20159/


All Articles