function rwb_appcache_comment() { header('Cache-Control: max-age=0'); header('Content-type: text/cache-manifest'); $hash = rwb_appcache_get_hash(); if (!isset($_GET['hash']) || $_GET['hash'] != $hash) { print round(time() / 100); } else { print $hash; } }
<!DOCTYPE html> <html manifest="<?php print $rwb_path_relative_to_request_path; ?> /rwb.appcache?hash=<?php print rwb_appcache_get_hash(); ?> "> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes"> <title><?php print self::$website_title; ?> </title> <?php print '<style>'; require 'substitute-page.css'; print '</style>'; ?> <script> if (top != self && window.name == '<?php print self::IFRAME_WINDOW_NAME; ?> ') { console.log('top != self'); top.location = window.location; } </script>