Is there any way you can transfer data to a page, and not periodically check it?
Obviously, you can periodically check it with ajax, but is there a way to force the page to reload when running a php script?
Theoretically, you can improve the speed of an ajax request by having a table only for when it is supposed to execute the ajax function (update the value in the table when the ajax function should retrieve new data from the database), but this still requires a significant amount of memory and mysql connection, and also some time to wait until the request is executed, even if there is no update / you do not want to execute the ajax function, which retrieves database data.
Is there a way to make this even more effective than querying the database and checking the table in which the data is stored "if updated", or telling the ajax functions to execute from another page?
I assume node.js or HTML5 webSocket could also be a viable solution?
Or could you store the โupdatedโ data in a text file? Any suggestions are welcome.
source share