I often see on various not-so-good sites the neglect of ajax. It happens like this: the authorization form transfers the user to a separate page, on which is written in large letters: “ YOU ARE AUTHORIZED! "Or" YOUR MESSAGE WILL BE PUBLISHED AFTER THE MODERATOR TESTS . " Why create such pages really? This page does not carry any useful meaning. Sense load remained on the page from which the user switched in order to write a comment or log in. And now, he may have already forgotten why he did it. I used to do that too when I didn’t know what ajax is. These pages were simply involved in processing the $ _POST parameters, and when the user pressed F5 on that page, the post request was sent again. Even then I understood that something was wrong with this approach, but I couldn’t say what exactly.
Or vice versa - the unjustified use of ajax. For example, for a paginator - this of course can be beautiful but not too functional, you will not share the link with friends, and the search engines, as far as I know, JavaScript is not very digested yet.
And recently, I formalized for myself the rules for the use of ajax, which I follow relentlessly: ')
Useful pages are generated without using ajax. Traditional pages are well indexed, have a beautiful memorable URL that can be shared with friends.
2. All functional site controls only via ajax: adding comments, authorization form, switching site themes, etc. There is nothing for the user to show a page on which one line “Your blog's theme is changed!” - he already knows about it. In addition, the possibility of re-sending a post-request is excluded. (Yes, by the way, all ajax controls that change the state of the system must be sent via the post, but this is the topic of another article.)