• when we use ajax, does the browser still send a http request to flask like with a normal form submission? if no, why? if yes, why?

    Well, there certainly is a request that gets sent to the server, and it comes from the browser, so one answer is *yes*.

    A more nuanced answer is that there are two ways that the browser can send a request:

    So, what are the disadvantages of the "old" approach? If the replacement page is 99% the same as the current page, that's a lot of network traffic, screen layout, loss of context and delay for no good advantage.

    Disadvantages of Ajax are that it requires the client to have JS (in the past, many assistive technologies, such as browser for the blind, did not support JS, but most now do). Another is web crawlers and scrapers and such are harder to write; you can't just look for hyperlinks and forms.

    Thanks for this question!

  • No questions, thanks!

    I'm glad!