I am developing a simple login page in PHP/MySQL/Jquery but I have a strange behavioral: seems the page was reloaded without reason. The code of index.php file is:
<?php
session_start();
$_SESSION['key'] = hash('sha256',mt_rand());
error_log($_SESSION['key']);
// Print login page
include('views/login.phtml');
In the log message I found this rows:
[Wed Aug 29 23:21:05.323260 2018] [:error] [pid 99929] [client 127.0.0.1:57520] cb2d68d0a6307371311323894ad074a848a3f2a79d4778d571c38c2f42182f58
[Wed Aug 29 23:21:06.274971 2018] [:error] [pid 99929] [client 127.0.0.1:57520] 877786f919927f0c6be61afbb893a774f94f54c862eacf834be9f9968993a09a, referer: http://site.local:8080/index.php
Like the page was reloaded twice! If I open Chrome tool for page inspection a new row was added. I ask the source code with right click on the page, a new row was added. I don't understand why! Can you help me?