Offline in progress connection results will appear. What is offline mode? Enable, disable, work on different devices and applications. Exiting offline mode

Many of us still find ourselves in situations where we need to quickly find important information, but Internet access is limited or non-existent. And it's one thing to try to open an entertaining post on the site, and quite another to look for a phone number hotline bank or hospital. Today, for the first time, I will tell Habr's readers about how speeding up search in the Yandex application led to the ability to search for important information without the Internet.

But first you need to understand the main thing: why did we even take up offline search if the sites from the search results are still inaccessible in the absence of a network?

EDGE search

Yandex radar traditionally shows people who enter a query, but then leave the page without waiting for loading due to poor mobile internet. In this situation, we could not influence overall quality network and loading speed of all sites, but at least making the search process less painful and saving a little time was worth trying. Actually, that's why this project was originally called EDGE-search, i.e. search on slow internet.

There are two ways to speed up your search. First, optimize the web version and the APIs that the application uses as much as possible. And this work is also underway, but even this is not enough. Secondly, you can preload something on the device that will come in handy in case of a bad connection. It is obvious that it is physically impossible to fit the entire Internet index in the phone. Therefore, it was necessary to go from the side of local storage of ready-made search results for specific queries. By what? So far, no one knows how to predict the future needs of a person with high accuracy (but we are learning). Therefore, we take popular recurring requests.

When we talk about popular requests, many people imagine a [VKontakte] request and several similar ones. In fact, we have hundreds of thousands of less obvious requests that are regularly repeated in large numbers. And this is already many hundreds of megabytes of results. Moreover, we planned to save not only the search results, but also the tips that appear in the process of entering a query. And here many will ask: why keep hints offline, because a person is quite capable of entering a request without them?

When entering queries in the Yandex application, users see not ordinary search suggestions, but in the form of individual words / pairs of words (i.e. predictive text input). Regular hints cannot be edited: if you need to add a word, you will have to enter the entire query yourself. Tips in the form of words allow you to make edits, cover a much larger number of queries and significantly speed up their input by a person.


But the main thing is that the hints were especially useful when working offline. These hints help people frame their question the way most people do, which in turn increases the chance that the answer will come from the local cache. That is why it was important to keep the hints.

Empirically, we have selected a certain minimum of search queries (about 150 thousand) and hints, less than which there was no longer any sense to keep. But the volume of all this baggage was still beyond the decent (several hundred megabytes). Even taking into account the fact that only the top 10 results were stored for each query. Something had to be done.

From optimization to offline

We began to look for everything that could be sent "under the knife." Each result contained not only links to sites, but also favicons and snippets. Favicons are pictures, which means that serious savings could be made here. The same site can appear in the results for completely different queries, so we didn’t duplicate favicons from the very beginning, but stored them by site. And then we made it so that the probability of saving the favicon is directly proportional to the frequency of the site's appearance in the search results. In other words, we have abandoned most of the favicons, but visually this is not very striking.


The more we pared down the regular search results in favor of ready-made answers, the closer we came to understanding that our EDGE search is no longer just faster, but is able to answer a wide range of questions without an Internet connection at all. Without noticing it, we were already working on offline search. So, the bet must be made on ready-made answers. Realizing this, we began to enrich the base important facts, which before that could not get there due to the limitation of the popularity of the request. These results contain answers only, no websites.


Following a similar scheme, we copied into the database all the object response cards and all requests for which the object response is available. Offline search cards differ from the originals in the almost complete absence of pictures: we removed them for reasons of economy.

The growth of the fact base required further work on optimization and such a data storage structure that would be careful about device resources.

Dictionaries

The database is not downloaded to the device in its entirety, but in the form of separate dictionaries, and only with a Wi-Fi connection and only with a sufficient charge level. The breakdown into dictionaries is made for two reasons. First, if the connection breaks during the download, then during the next attempt, only those dictionaries that did not have time to download before will be downloaded. Secondly, to further save space, the database is downloaded and stored on the device in a compressed form, but with each request it is not unpacked in its entirety, but only in the necessary parts.


Each dictionary contains queries starting with certain letters, as well as all the data for issuing and prompting for these queries. It turned out to be more logical to sort the data before splitting it into dictionaries by the first letters of the queries than, for example, by their popularity. Imagine the situation: the first dictionary contains the most popular queries, the second - a little less popular, and so on. But the popularity of queries often changes, and this will lead to the need to regularly update dictionaries just to move a query from one to another. These are the costs of traffic, energy and time. Therefore, it was important to make sure that when updating the database, queries do not move between dictionaries. Alphabetical order proved to be a simple and effective solution.

Answers to the same queries may differ in different parts of the country, so different dictionaries are formed for different regions. Moreover, during short-term visits to another region, the application will not rush to update dictionaries - we have provided for business trips and tourism scenarios.

No matter how hard we try, offline search does not cover all possible queries, but already now it helps out on average with every third one. As with any average result, this means that one subset of users encounter offline responses much more often than others. Therefore, we, of course, allow you to completely disable offline search in the settings.

Our team would be interested to know the opinion of Habr's readers about this direction and get feedback on the work of the beta Yandex application for Android. Thank you.

What is offline mode? If to speak plain language, this is the ability to work in any application in the absence of access to communication. For computers, this is a shutdown, first of all, of the Internet, and possibly local network. For mobile phones, this also disables both telephony and Bluetooth.

Why do you need offline mode on computers?

Most PC users, even when working in programs that do not require access to the Internet, are constantly connected to it. Some are out of habit, others due to the use of operating systems such as ChromeOS. In this system, all actions are performed via the Internet. If you need to print something, and there is no access to the Web, then there is nothing you can do, unless, of course, the document is saved in local storage and there is no other operating system.

In addition, Google is known to track user activities and transfer their personal data to US intelligence agencies upon request. If you are not concerned about privacy issues, then remember that for MS Windows, which most users use, the Web is full of viruses, and picking them up where the Internet could not be used is sometimes quite insulting.

Offline mode in mobile phone

After we figured out what offline mode is in a computer, let's see what it is in mobile phone.

On phones running the Android operating system, this is referred to as "Offline Mode". It is used in places where the use of mobile communications is unacceptable. An example of such a place would be an airplane, which is why this mode is often referred to as "Airplane Mode" on phones. Using this mode allows you to save the battery, which, as you know, tends to be discharged at the most inopportune time.

How to disable offline mode? This happens differently on different phones. Usually this option is located in "Settings", where you need to select "Profiles" or "Modes", and there already check the box next to " normal mode". Some models require a reboot, after which it will automatically prompt you to switch to normal mode.

Removing offline mode in browsers

If you have limited traffic that suddenly began to end, you need to urgently go offline. What is being done in this case? You should enable offline mode in browsers with which you accessed the World Wide Web. Then many of the pages that were visited while the Internet was running can be viewed from the cache.

In this case, the answer to the question "how to remove offline mode" is quite trivial - you need to uncheck "Offline mode". In new versions of browsers, the menu bar is usually hidden, so you need to call it accessible way, for example, by pressing Alt on the keyboard, and then select "Offline Mode".

Offline as a synonym for invisibility

The term "offline" has become so popular that it has come to be used not only as an indicator of being offline, but also as an indicator of real or perceived being offline. So, you can go to the social network "VKontakte" and become invisible to other users. That is, you will be present on the site, but for other users, your status indicates completely opposite information. This is also called "being offline".

Working with some Internet applications offline

Initially, online applications such as Google Docs were able to work offline. It can be noted that this contributes to a healthy rivalry between the creators of office applications, primarily Microsoft and Google corporations, which should increase their competitiveness.

How to enable offline mode in Google Docs? This can be achieved using the Chrome browser or its open-source counterpart Chromium. We open our "cloud" in it in "Google Drive" - ​​for this you need the Internet, then in the navigation bar click on the "More" button. We select the "Offline" category, as a result of which an instruction will appear, which indicates that you first need to install the addon for these purposes, and then click the offline access button. This will cause the files from the "cloud" to be copied to the local storage device. After that, you can turn off the Internet and work with Google Docs offline.

Thus, we answered the question: "How to enable offline mode in Google Docs applications?"

You can do the same with Google Maps. When in online mode, an area on the map is indicated that will be needed when working offline. The map is then downloaded and the area can be searched offline.

In a mobile phone, offline mode can be enabled not only by completely turning off the mobile network, but also by turning off one Internet by unchecking "Use mobile data".

Exiting offline mode

Sometimes for individual applications going offline can be blocked by firewalls. So, in "Steam" for games, offline mode is also provided. At the same time, in Social Club, some users cannot leave offline mode. In order to remove this restriction, you need to go to the firewall settings and adjust the rules and zones there. Here, these Social Club files are given a taboo to access the Internet. It must be removed, after which it will be possible to exit the offline mode.

This applies not only to Social Club, but also to some Steam games. Possibly observed in other applications as well.

How to exit offline mode? If this operation is blocked, go to the firewall, check the rules and zones, make them permissive for this application. If this happens frequently, check your Windows firewall settings.

Finally

To summarize: what is offline mode? In addition to the fact that this is a mode without access to the Internet, this term also means invisibility in some in social networks. Some Internet applications are able to work offline, while downloading "cloud" files to local storage.

Many of us still find ourselves in situations where we need to quickly find important information, but Internet access is limited or non-existent. And it's one thing to try to open an entertaining post on a website, and quite another to look up the phone number of a bank or hospital hotline. Today, for the first time, I will tell Habr's readers about how speeding up search in the Yandex application led to the ability to search for important information without the Internet.

But first you need to understand the main thing: why did we even take up offline search if the sites from the search results are still inaccessible in the absence of a network?

EDGE search

Yandex radar traditionally shows people who enter a query but then leave the page without waiting for the download due to poor mobile internet. In this situation, we could not affect the overall quality of the network and the loading speed of all sites, but at least making the search process less painful and saving a little time was worth trying. Actually, that's why this project was originally called EDGE-search, i.e. search on slow internet.

There are two ways to speed up your search. First, optimize the web version and the APIs that the application uses as much as possible. And this work is also underway, but even this is not enough. Secondly, you can preload something on the device that will come in handy in case of a bad connection. It is obvious that it is physically impossible to fit the entire Internet index in the phone. Therefore, it was necessary to go from the side of local storage of ready-made search results for specific queries. By what? So far, no one knows how to predict the future needs of a person with high accuracy (but we are learning). Therefore, we take popular recurring requests.

When we talk about popular requests, many people imagine a [VKontakte] request and several similar ones. In fact, we have hundreds of thousands of less obvious requests that are regularly repeated in large numbers. And this is already many hundreds of megabytes of results. Moreover, we planned to save not only the search results, but also the tips that appear in the process of entering a query. And here many will ask: why keep hints offline, because a person is quite capable of entering a request without them?

When entering queries in the Yandex application, users see not ordinary search suggestions, but in the form of individual words / pairs of words (i.e. predictive text input). Regular hints cannot be edited: if you need to add a word, you will have to enter the entire query yourself. Tips in the form of words allow you to make edits, cover a much larger number of queries and significantly speed up their input by a person.

But the main thing is that the hints were especially useful when working offline. These hints help people frame their question the way most people do, which in turn increases the chance that the answer will come from the local cache. That is why it was important to keep the hints.

Empirically, we have selected a certain minimum of search queries (about 150 thousand) and hints, less than which there was no longer any sense to keep. But the volume of all this baggage was still beyond the decent (several hundred megabytes). Even taking into account the fact that only the top 10 results were stored for each query. Something had to be done.

From optimization to offline

We began to look for everything that could be sent "under the knife." Each result contained not only links to sites, but also favicons and snippets. Favicons are pictures, which means that serious savings could be made here. The same site can appear in the results for completely different queries, so we didn’t duplicate favicons from the very beginning, but stored them by site. And then we made it so that the probability of saving the favicon is directly proportional to the frequency of the site's appearance in the search results. In other words, we have abandoned most of the favicons, but visually this is not very striking.

The more we pared down the regular search results in favor of ready-made answers, the closer we came to understanding that our EDGE search is no longer just faster, but is able to answer a wide range of questions without an Internet connection at all. Without noticing it, we were already working on offline search. So, the bet must be made on ready-made answers. Realizing this, we began to enrich the database with important facts that could not get there before due to the limitation of the popularity of the request. These results contain answers only, no websites.

Following a similar scheme, we copied into the database all the object response cards and all requests for which the object response is available. Offline search cards differ from the originals in the almost complete absence of pictures: we removed them for reasons of economy.

The growth of the fact base required further work on optimization and such a data storage structure that would be careful about device resources.

Dictionaries

The database is not downloaded to the device in its entirety, but in the form of separate dictionaries, and only with a Wi-Fi connection and only with a sufficient charge level. The breakdown into dictionaries is made for two reasons. First, if the connection breaks during the download, then during the next attempt, only those dictionaries that did not have time to download before will be downloaded. Secondly, to further save space, the database is downloaded and stored on the device in a compressed form, but with each request it is not unpacked in its entirety, but only in the necessary parts.

Each dictionary contains queries starting with certain letters, as well as all the data for issuing and prompting for these queries. It turned out to be more logical to sort the data before splitting it into dictionaries by the first letters of the queries than, for example, by their popularity. Imagine the situation: the first dictionary contains the most popular queries, the second - a little less popular, and so on. But the popularity of queries often changes, and this will lead to the need to regularly update dictionaries just to move a query from one to another. These are the costs of traffic, energy and time. Therefore, it was important to make sure that when updating the database, queries do not move between dictionaries. Alphabetical order proved to be a simple and effective solution.

Answers to the same queries may differ in different parts of the country, so different dictionaries are formed for different regions. Moreover, during short-term visits to another region, the application will not rush to update dictionaries - we have provided for business trips and tourism scenarios.

No matter how hard we try, offline search does not cover all possible requests, but already now it helps out on average with every third one. As with any average result, this means that one subset of users encounter offline responses much more often than others. Therefore, we, of course, allow you to completely disable offline search in the settings.

Our team would be interested to know the opinion of Habr readers about this direction and get feedback on the work of the beta

The Russian application "Yandex.Search" for the iPhone has acquired a hidden search function without an Internet connection. This innovation was discovered by some users of the program after updating to version 2.0. At present, almost anyone can try all the advantages of offline search, the Yandex press service told our editors.

Initially, the idea was to implement offline access to systems that cannot work correctly without direct connection to the Web, appeared among the developers of navigation systems. Ability to preload data including routes and major driving directions public transport, relished by travelers and ordinary inhabitants. It turned out to be much more difficult to equip a search engine with similar functionality, but nothing was impossible for the creators of ".Search".


Anyone with an iPhone or iPad running iOS version 8.1 or later can participate in the beta test. You can activate the initially hidden function by repeatedly launching the application and then unloading it from the multitasking menu. After the offline search tab appears in the settings menu, the system will automatically download the information necessary for working offline, the volume of which can vary from 40 to 120 megabytes. What such oddities are connected with, Yandex does not report.

>

The downloaded database allows you to access emergency phone numbers, banks, and much of what the average user would be least interested in. At the same time, which is strange, offline search refused to give me the number of the rescue service and ambulance. Instead, I could increase my own horizons by reading the biography of pop star Philip Bedrosovich Kirkorov, the history of Italy and the Renaissance, and also find out how to get to the city of Orel.


According to some data, the information provided to users may differ significantly from each other. In other words, the information that one can gather will be completely inaccessible to others. The selectivity of the application, apparently, directly depends on the volume of the previously downloaded cache, which is automatically updated at night, provided you are connected to the Internet. Whether offline search without any restrictions will become ubiquitous remains a mystery at the moment.

True, while in closed beta.

On June 30, Yandex updated its search engine for iOS to version 2.0, in which several small useful innovations appeared, which are described in the description of the update in the App Store, but the developers kept silent about the most interesting. According to Tjournal, the app has added an offline search feature in beta mode that allows you to find answers to some questions without an Internet connection.

The "Offline search" section in the application did not appear for everyone, only for a small number of testers. When used, the service downloads to the device a “small database of answers to popular queries” larger than 100 MB.

Yandex uses this database when a user tries to find something when there is no Internet connection or at a slow speed (for example, via Edge). The database contains phone numbers of support services and hotlines, basic information about famous people and films, as well as a translator. Offline search only displays text information.

The base of online responses to requests is updated once a day if there is a Wi-Fi connection and sufficient battery power of the device, Yandex said. When and whether the new feature will work at all is still unknown. As well as whether users on Android will be able to test it.

Yandex - search and picture of the day

Is free
Buyer ratings: 3.5 (ratings - 33)
Developer: Yandex LLC
Categories: Utilities, Reference
Languages: English, KK, Russian, Turkish, UK
The size: 23.34MB




Top