New version of Safari browser

Safari is a browser initially designed as a platform for Apple Macintosh, but later created his own version and operating systems of Windows.

The program has a full set of features necessary for comfortable work on the Internet.Interface is equipped with tabs, bookmarks system, with means of searching and reading of RSS, and a module for automatically filling out forms.

Among the major changes in Safari five stand out:function Safari Reader, higher productivity, search using Microsoft Bing, expanded support for HTML5, and the new Safari Developer Program, under which developers can write their own extensions to the browser.According to Apple, for greater certainty, these extensions will work completely independently of the browser, which means that the stability of various additives will not affect the stability of the application as a whole.

Higher operating speed of Safari 5 is achieved in three ways.First, the processing speed of JavaScript has grown by 25 percent, and according to observations of its first users – even by 30%. Second is the improved caching – recorded in the browser cache more data types. Third, fifth in Safari appears pre-extraction of DNS.In practice this means that when you open a page Safari automatically passes through links on this page and search addresses. Thus, after you’ve clicked on a specific address, Safari will now be ready to immediately retrieve data from it.Safari 5 now uses the resources of the graphics card for faster processing of the contents of windows and tabs.

With speed indicators Safari does not differ significantly from modern solutions with similar features, and some even exceeded.However, developers argue that their browser has two times higher performance than that of Firefox when displaying pages in HTML format. Built-in RSS-client is not comfortable enough, while other solutions for Windows can be found more useful examples.

Safari supports many new features of HTML5, including the function to determine the location (Geolocation), full-screen mode for HTML5 video, hide the subtitles in HTML5 video elements of the new layout of the pages (article, aside, footer, header, hgroup, nav and section), the history of HTML5 AJAX, EventSource, WebSocket, attribute the function of dragging in HTML5, checking forms and HTML5 HTML5 Ruby.

Among other changes in Safari five stand out: a search with MS Bing; smart address bar (when entering text in the intelligent address bar search is performed to match the titles of Web pages in history and bookmarks, as well as parts of URL-addresses these web pages);setting tabs allows automatic opening of Web pages do not in separate windows, in new tabs, a search in the whole story was added to label the date of viewing the page, when you turn the mode “Private Browsing” in the smart address bar appears on the corresponding icon ;detection of potentially harmful scripts used in cross site scripting attacks through (XSS) and others.

Повече от 400 милиона потребители използват Firefox

Браузърът Firefox вече е инсталиран на компютрите на повече от 400 милиона потребители. При това 140 милиона от тях използват интернет браузъра всеки ден. Това се посочва в годишния финансов отчет за Mozilla Foundation за 2009 год., публикуван днес. В документа се подчертава, че нарастването на популярността на програмата за разглеждане на уеб страници се дължи в немалка степен и на мобилната версия на Firefox. Не толкова отдавна “огнената лисица” стана достъпна и за собствениците на смартфони, базирани на Android 2.0+ и Maemo.

Според доклада, приходите на компанията през миналата година са се увеличили с 34% до 104 млн. долара (в сравнение с $78 милиона, отчетени през 2008 год.). Освен това са се увеличили и разходите за компютърно оборудване и персонал – от $49 милиона през 2008 година до 61 милиона долара през 2009 година.

Основният източник на приходи за Mozilla Foundation остава партньорството с различни търсещи машини – голямата част от приходите през 2009 год. са дошли от интернет корпорацията Google, както и от Yahoo!, Amazon, eBay и Yandex. “Надяваме се, че нашите партньори в търсенето ще продължат да бъдат надежден източник на приходи за Mozilla в обозримото бъдеще”, се казва в доклада.

Сега Firefox заема второ място по популярност в света. Според последния доклад на изследователската група Net Applications, делът на “огнената лисица” в световния пазар на интернет браузърите през октомври 2010 год. е 22.82%. Браузърът от Mozilla изпреварва чувствително Google Chrome, но изостава зад Microsoft Internet Explorer.

Instant Previews: Under the hood

If you’ve used Google Search recently, you may have noticed a new feature that we’re calling Instant Previews. By clicking on the (sprited) magnifying glass icon next to a search result you see a preview of that page, often with the relevant content highlighted. Once activated, you can mouse over the rest of the results and quickly (instantly!) see previews of those search results, too.

Adding this feature to Google Search involved a lot of client-side Javascript. Being Google, we had to make sure we could deliver this feature without slowing down the page. We know our users want their results fast. So we thought we’d share some techniques involved in making this new feature fast.

JavaScript compilation

This is nothing new for Google Search: all our Javascript is compiled to make it as small as possible. We use the open-sourced Closure Compiler. In addition to minimizing the Javascript code, it also re-writes expressions, reuses variables, and prunes out code that is not being used. The Javascript on the search results page is deferred, and also cached very aggressively on the client side so that it’s not downloaded more than once per version.

On-demand JSONP

When you activate Instant Previews, the result previews are requested by your web browser.
There are several ways to fetch the data we need using Javascript. The most popular techniques are XmlHttpRequest (XHR) and JSONP. XHR generally gives you better control and error-handling, but it has two drawbacks: browsers caching tends to be less reliable, and only same-origin requests are permitted (this is starting to change with modern browsers and cross-origin resource sharing, though). With JSONP, on the other hand, the requested script returns the desired data as a JSON object wrapped in a Javascript callback function, which in our case looks something like

google.vs.r({"dim":[302,585],"url":"http://example.com",ssegs:[...]}).

Although error handling with JSONP is a bit harder to do compared to XHR (not all browsers support onerror events), JSONP can be cached aggressively by the browser, and is not subject to same-origin restrictions. This last point is important for Instant Previews because web browsers restrict the number of concurrent requests that they send to any one host. Using a different host for the preview requests means that we don’t block other requests in the page.

There are a couple of tricks when using JSONP that are worth noting:

  • If you insert the script tag directly, e.g. using document.createElement, some browsers will show the page as still “loading” until all script requests are finished. To avoid that, make your DOM call to insert the script tag inside a window.setTimeout call.
  • After your requests come back and your callbacks are done, it’s a good idea to set your script src to null, and remove the tag. On some browsers, allowing too many script tags to accumulate over time may slow everything down.

Data URIs

At this point you are probably curious as to what we’re returning in our JSONP calls, and in particular, why we are using JSON and not just plain images. Perhaps you even used Firebug or your browser’s Developer Tools to examine the Instant Previews requests. If so, you will have noticed that we send back the image data as sets of data URIs. Data URIs are base64 encodings of image data, that modern browsers (IE8+, Chrome, Safari, Firefox, Opera, etc) can use to display images, instead of loading them from a server as usual.

To show previews, we need the image, and the relevant content of the page for the particular query, with bounding boxes that we draw on top of the image to show where that content appears on the page. If we used static images, we’d need to make one request for the content and one request for the image; using JSONP with data URIs, we make just one request. Data URIs are limited to 32K on IE8, so we send “slices” that are all under that limit, and then use Javascript to generate the necessary image tags to display them. And even though base64 encoding adds about 33% to the size of the image, our tests showed that gzip-compressed data URIs are comparable in size to the original JPEGs.

We use caching throughout our implementation, but it’s important to not forget about client-side caching as well. By using JSONP and data URIs, we limit the number of requests made, and also make sure that the browser will cache the data, so that if you refresh a page or redo a query, you should get the previews, well… instantly!

By Matías Pelenur, Instant Previews team