H
H
happyer2018-01-08 00:22:04
Socket.io
happyer, 2018-01-08 00:22:04

What is the best way to use Ajax?

Hello, I'm trying to implement content loading with Ajax on the site. I wrote a code that loads all the necessary files depending on clicking on the menu, and accordingly with changing links, but there was such a problem when I connect the database to the main file and refresh the page, everything works fine, but when I click on the menu, then gives an error that there is no connection to the database (as I understand it, when loading Ajax does not check the files that were loaded before, which is logical), so the question itself is how can I fix this whole thing? Are there any adequate ways to load content so that it would not be necessary to connect a database to each file, but only to one (I didn’t really understand sockets and I don’t know what it is, and if I need to figure it out, I’ll figure it out)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question