Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Detect the page realod in php

$pageWasRefreshed = isset($_SERVER['HTTP_CACHE_CONTROL']) && $_SERVER['HTTP_CACHE_CONTROL'] === 'max-age=0';
 
if($pageWasRefreshed ) {
  //do something because page was refreshed;
} else {
  //do nothing;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Detect #page #realod #php
ADD COMMENT
Topic
Name
8+8 =