I
I
Ivanko2018-03-21 15:47:29
AJAX
Ivanko, 2018-03-21 15:47:29

Should you use Ajax?

Since I don’t really like constant page reloads, I use ajax (JS / jQuery) wherever possible in my intranet php projects - form validation, form submission, etc. - everything works fine.
The question is - can there be any difficulties with this approach when the load on the site increases?
And are there any downsides in the future (except for the option that js can be disabled on the client)?
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Timofeev, 2018-03-21
@webinar

And why then not make a SPA and use 1 from a bunch of js frameworks for this, and leave only api for this SPA in php.

U
uvelichitel, 2018-03-21
@uvelichitel

The ajax load characteristics are even better. Disadvantages, apparently known to you:
- poorly indexed by search robots
- in critical places, another source of unreliability. A simple http request may or may not succeed and return an error. ajax request returns only a promise, the open page of say the financial system will work, the buttons will be pressed and if contact with the server is lost, you can lose consistency.

A
abroabr, 2018-03-21
@abroabr

just that the page load time before it can be used is longer.
after the initial load - there are no longer any shortcomings in performance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question