Create a forum without manually refreshing the page (without AJAX or Javascript)

for a school project I am creating a forum that should work synchronously, because its purpose is to discuss in real time for a set period. Therefore, it is important to update new updates every time.

At the moment, my forum looks good, but it has one big problem. When I log in, I immediately see my messages. But when someone posted something in between, I can only see this when I post a new reaction or manually refresh the page. Of course, this is very annoying.

I know that this can be fixed with AJAX and / or Javascript, but the problem is that my forum should work without these two things. Therefore, I was looking for solutions, but I did not find what I was looking for.

Every answer I found uses Javasript or Ajax. When I wrote my question here, I founded another simulation that looks the same ("Refresh Div, Table or TR without reloading the page and without using Ajax"), but when I looked back I saw Javasript. So this is still not what I am looking for.

I also tried putting the code to view updates in a different place in my code. but even then it will not work. I hope someone can help me do this well.

Kirsten

Ps: sorry if there are some small errors in English

Here is an example of my code

include('jeugdhulp_2-0_connectie.php');
include('klasses/Reacties.class.php');  

$reactie = new Reacties();
$stellingen = $reactie->ToonStelling();

//$recenteactiviteiten = $reactie->ToonRecenteReacties();

if(!empty($_POST['tekst_gebruiker']))
{
    $reactie->Reactie = $_POST['tekst_gebruiker'];
    $reactie->ID = $_SESSION["gebruikersid"];       
    try
    {
        $reactie->Save();
        //$reactie->ToonStelling();
        //$feedback = "Uw gegevens werden bewaard!";
    }
    catch(Exception $e)
    {
        $feedback = $e->getMessage();
    }
}
else
{
    $feedback = "";
}
//altijd recente reacties laten zien
$recenteactiviteiten = $reactie->ToonRecenteReacties();
+3
source share
4 answers

- , Facebook, , , . , , - :)

- ? " ".

Ape . Ajax Push , , .

, Javascript AJAX , .

+1

Ajax Javascript HTML . ,

0

If you hate using javascript <iframe>and meta refresh

0
source

you can use meta refresh (in the frame at the end), but it will not be in real time; meta-refresh uses a timer to automatically call a page

edit: with ajax, this will not be in real time if you do not “listen” for updates redirected by the server through the connection that you return to the server; otherwise you will use a timer yet

0
source

All Articles