Search
 
SCRIPT & CODE EXAMPLE
 

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;
}
Comment

PREVIOUS NEXT
Code Example
Php :: php reload after env 
Php :: php assign an array inside a foreach loop 
Php :: laravel custom validation 
Php :: php extend class 
Php :: php audio embed 
Php :: Use external variable in array_filter 
Php :: filament make resource 
Php :: Laravel 8 Auth Scaffolding using Inertia Jetstream 
Php :: Laravel 9 Mail File 
Php :: laravel validation if another record is not deleted / not null 
Php :: wp_query start from second post 
Php :: Laravel Secured Password 
Php :: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given 
Php :: get search query wordpress dev 
Php :: php user ip from post request 
Php :: PHP - Elegant way of removing values from Associative Arrays based on a key value duplication 
Php :: php initialize two dimensional array dynamically 
Php :: toast in laravel 
Php :: canany else 
Php :: php dar echo em um stdClass 
Php :: simple bindings laravel 
Php :: how to prevent the Undefined index in php 
Php :: Laravel get all parent categories for each category 
Php :: laravel collection shift 
Php :: save big data with laravel 
Php :: install php7 
Php :: Csv To AssoT Php 
Php :: laravel check model column was changed 
Php :: php unset by value 
Php :: meta_value wordpress 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =