Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async perfomance/ch1 #191

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion async & performance/ch1.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ ajax( "http://some.url.1", function myCallbackFunction(data){
} );
```

**Warning:** You may have heard that it's possible to make synchronous Ajax requests. While that's technically true, you should never, ever do it, under any circumstances, because it locks the browser UI (buttons, menus, scrolling, etc.) and prevents any user interaction whatsoever. This is a terrible idea, and should always be avoided.
**Предупреждение:** Вы могли слышать, что является возможным выполнять синхронные Ajax вызовы. Хотя, технически это верно, вы никогда и ни при каких обстоятельствах не должны этого делать, т.к. это блокирует пользовательский интерфейс браузера (кнопки, меню, скроллы, и т.д.) и предотвращает любое взаимодействие с пользователем. Это ужасная идея, и ее всегда следует избегать.

Before you protest in disagreement, no, your desire to avoid the mess of callbacks is *not* justification for blocking, synchronous Ajax.

For example, consider this code:


```js
function now() {
return 21;
Expand Down