force favicon and manifest reload

This commit is contained in:
Adrien MALINGREY 2023-04-30 03:43:18 +02:00
parent 7c65480bdd
commit e80fef6c08
3 changed files with 43 additions and 45 deletions

View File

@ -7,26 +7,26 @@
<link href="https://cdn.jsdelivr.net/npm/bootstrap-dark-5@1.1.3/dist/css/bootstrap-night.min.css" rel="alternate stylesheet" type="text/css" title="Sombre" /> <link href="https://cdn.jsdelivr.net/npm/bootstrap-dark-5@1.1.3/dist/css/bootstrap-night.min.css" rel="alternate stylesheet" type="text/css" title="Sombre" />
<link href="https://cdn.jsdelivr.net/npm/remixicon@3.2.0/fonts/remixicon.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/remixicon@3.2.0/fonts/remixicon.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/style.css" /> <link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="apple-touch-icon" href="thumbnail.php?size=57" sizes="57x57"> <link rel="apple-touch-icon" href="thumbnail.php?size=57&grid=<?=$currentGrid?>" sizes="57x57">
<link rel="apple-touch-icon" href="thumbnail.php?size=114" sizes="114x114"> <link rel="apple-touch-icon" href="thumbnail.php?size=114&grid=<?=$currentGrid?>" sizes="114x114">
<link rel="apple-touch-icon" href="thumbnail.php?size=72" sizes="72x72"> <link rel="apple-touch-icon" href="thumbnail.php?size=72&grid=<?=$currentGrid?>" sizes="72x72">
<link rel="apple-touch-icon" href="thumbnail.php?size=144" sizes="144x144"> <link rel="apple-touch-icon" href="thumbnail.php?size=144&grid=<?=$currentGrid?>" sizes="144x144">
<link rel="apple-touch-icon" href="thumbnail.php?size=60" sizes="60x60"> <link rel="apple-touch-icon" href="thumbnail.php?size=60&grid=<?=$currentGrid?>" sizes="60x60">
<link rel="apple-touch-icon" href="thumbnail.php?size=120" sizes="120x120"> <link rel="apple-touch-icon" href="thumbnail.php?size=120&grid=<?=$currentGrid?>" sizes="120x120">
<link rel="apple-touch-icon" href="thumbnail.php?size=76" sizes="76x76"> <link rel="apple-touch-icon" href="thumbnail.php?size=76&grid=<?=$currentGrid?>" sizes="76x76">
<link rel="apple-touch-icon" href="thumbnail.php?size=152" sizes="152x152"> <link rel="apple-touch-icon" href="thumbnail.php?size=152&grid=<?=$currentGrid?>" sizes="152x152">
<link rel="icon" type="image/png" href="thumbnail.php?size=196" sizes="196x196"> <link rel="icon" type="image/png" href="thumbnail.php?size=196&grid=<?=$currentGrid?>" sizes="196x196">
<link rel="icon" type="image/png" href="thumbnail.php?size=160" sizes="160x160"> <link rel="icon" type="image/png" href="thumbnail.php?size=160&grid=<?=$currentGrid?>" sizes="160x160">
<link rel="icon" type="image/png" href="thumbnail.php?size=96" sizes="96x96"> <link rel="icon" type="image/png" href="thumbnail.php?size=96&grid=<?=$currentGrid?>" sizes="96x96">
<link rel="icon" type="image/png" href="thumbnail.php?size=16" sizes="16x16"> <link rel="icon" type="image/png" href="thumbnail.php?size=16&grid=<?=$currentGrid?>" sizes="16x16">
<link rel="icon" type="image/png" href="thumbnail.php?size=32" sizes="32x32"> <link rel="icon" type="image/png" href="thumbnail.php?size=32&grid=<?=$currentGrid?>" sizes="32x32">
<link rel="manifest" href="manifest.php"> <link rel="manifest" href="manifest.php?grid=<?=$currentGrid?>">
<meta property="og:title" content="Sudoku" /> <meta property="og:title" content="Sudoku" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:url" <meta property="og:url"
content="<?=$_SERVER["REQUEST_SCHEME"]."://".$_SERVER["HTTP_HOST"].$_SERVER["DOCUMENT_URI"]?>" /> content="<?=$_SERVER["REQUEST_SCHEME"]."://".$_SERVER["HTTP_HOST"].$_SERVER["DOCUMENT_URI"]?>" />
<meta property="og:image" <meta property="og:image"
content="<?=$_SERVER["REQUEST_SCHEME"]."://".$_SERVER["HTTP_HOST"].dirname($_SERVER["DOCUMENT_URI"])?>/thumbnail.php?size=200" /> content="<?=$_SERVER["REQUEST_SCHEME"]."://".$_SERVER["HTTP_HOST"].dirname($_SERVER["DOCUMENT_URI"])?>/thumbnail.php?size=200&grid=<?=$currentGrid?>" />
<meta property="og:image:width" content="200" /> <meta property="og:image:width" content="200" />
<meta property="og:image:height" content="200" /> <meta property="og:image:height" content="200" />
<meta property="og:description" <meta property="og:description"

View File

@ -1,7 +1,6 @@
<?php <?php
session_start(); if (isset($_GET["grid"]))
if (isset($_SESSION["currentGrid"])) $currentGrid = $_GET["grid"];
$currentGrid = $_SESSION["currentGrid"];
else else
$currentGrid = "."; $currentGrid = ".";
?> ?>
@ -10,27 +9,27 @@
"name": "Sudoku", "name": "Sudoku",
"description": "Remplissez la grille de sorte que chaque ligne, colonne et région (carré de 3×3 cases) contienne tous les chiffres de 1 à 9.", "description": "Remplissez la grille de sorte que chaque ligne, colonne et région (carré de 3×3 cases) contienne tous les chiffres de 1 à 9.",
"icons": [{ "icons": [{
"src": "thumbnail.php?size=48", "src": "thumbnail.php?size=48&grid=<?=$currentGrid?>",
"sizes": "48x48", "sizes": "48x48",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=72", "src": "thumbnail.php?size=72&grid=<?=$currentGrid?>",
"sizes": "72x72", "sizes": "72x72",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=96", "src": "thumbnail.php?size=96&grid=<?=$currentGrid?>",
"sizes": "96x96", "sizes": "96x96",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=144", "src": "thumbnail.php?size=144&grid=<?=$currentGrid?>",
"sizes": "144x144", "sizes": "144x144",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=168", "src": "thumbnail.php?size=168&grid=<?=$currentGrid?>",
"sizes": "168x168", "sizes": "168x168",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=192", "src": "thumbnail.php?size=192&grid=<?=$currentGrid?>",
"sizes": "192x192", "sizes": "192x192",
"type": "image/png" "type": "image/png"
}], }],
@ -47,27 +46,27 @@
"description": "Continuer cette grille de sudoku", "description": "Continuer cette grille de sudoku",
"url": "<?=$currentGrid?>", "url": "<?=$currentGrid?>",
"icons": [{ "icons": [{
"src": "thumbnail.php?size=48", "src": "thumbnail.php?size=48&grid=<?=$currentGrid?>",
"sizes": "48x48", "sizes": "48x48",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=72", "src": "thumbnail.php?size=72&grid=<?=$currentGrid?>",
"sizes": "72x72", "sizes": "72x72",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=96", "src": "thumbnail.php?size=96&grid=<?=$currentGrid?>",
"sizes": "96x96", "sizes": "96x96",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=144", "src": "thumbnail.php?size=144&grid=<?=$currentGrid?>",
"sizes": "144x144", "sizes": "144x144",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=168", "src": "thumbnail.php?size=168&grid=<?=$currentGrid?>",
"sizes": "168x168", "sizes": "168x168",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=192", "src": "thumbnail.php?size=192&grid=<?=$currentGrid?>",
"sizes": "192x192", "sizes": "192x192",
"type": "image/png" "type": "image/png"
}] }]
@ -78,27 +77,27 @@
"description": "Grille de sudoku vierge", "description": "Grille de sudoku vierge",
"url": ".................................................................................", "url": ".................................................................................",
"icons": [{ "icons": [{
"src": "thumbnail.php?size=48", "src": "thumbnail.php?size=48&grid=<?=$currentGrid?>",
"sizes": "48x48", "sizes": "48x48",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=72", "src": "thumbnail.php?size=72&grid=<?=$currentGrid?>",
"sizes": "72x72", "sizes": "72x72",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=96", "src": "thumbnail.php?size=96&grid=<?=$currentGrid?>",
"sizes": "96x96", "sizes": "96x96",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=144", "src": "thumbnail.php?size=144&grid=<?=$currentGrid?>",
"sizes": "144x144", "sizes": "144x144",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=168", "src": "thumbnail.php?size=168&grid=<?=$currentGrid?>",
"sizes": "168x168", "sizes": "168x168",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=192", "src": "thumbnail.php?size=192&grid=<?=$currentGrid?>",
"sizes": "192x192", "sizes": "192x192",
"type": "image/png" "type": "image/png"
}] }]
@ -109,27 +108,27 @@
"description": "Nouvelle grille de sudoku", "description": "Nouvelle grille de sudoku",
"url": ".", "url": ".",
"icons": [{ "icons": [{
"src": "thumbnail.php?size=48", "src": "thumbnail.php?size=48&grid=<?=$currentGrid?>",
"sizes": "48x48", "sizes": "48x48",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=72", "src": "thumbnail.php?size=72&grid=<?=$currentGrid?>",
"sizes": "72x72", "sizes": "72x72",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=96", "src": "thumbnail.php?size=96&grid=<?=$currentGrid?>",
"sizes": "96x96", "sizes": "96x96",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=144", "src": "thumbnail.php?size=144&grid=<?=$currentGrid?>",
"sizes": "144x144", "sizes": "144x144",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=168", "src": "thumbnail.php?size=168&grid=<?=$currentGrid?>",
"sizes": "168x168", "sizes": "168x168",
"type": "image/png" "type": "image/png"
}, { }, {
"src": "thumbnail.php?size=192", "src": "thumbnail.php?size=192&grid=<?=$currentGrid?>",
"sizes": "192x192", "sizes": "192x192",
"type": "image/png" "type": "image/png"
}] }]

View File

@ -1,8 +1,7 @@
<?php <?php
require("classes.php"); require("classes.php");
session_start(); if (isset($_GET["grid"]))
if (isset($_SESSION["currentGrid"])) $currentGrid = $_GET["grid"];
$currentGrid = $_SESSION["currentGrid"];
else else
$currentGrid = ".528.3....4.9.1...39.562......73.129...1.64.7...42.3656.13.5...28.6.4...4.5287..."; $currentGrid = ".528.3....4.9.1...39.562......73.129...1.64.7...42.3656.13.5...28.6.4...4.5287...";
header ("Content-type: image/png"); header ("Content-type: image/png");