I’m doing some webdesignthingsies for a client, and I update them manually via html because I suck at database coding.
Anyway, when I upload updates, it seems regular visitors have to manually reload the pages to get the news, and that’s no good at all. Now, I could learn new tricks, but I dunno… I’d just love to have some extra tag or something that makes the link users click automatically fetch it online in stead of from the cache.
Any ideas? Or should I just suck it up and learn to program database?
If the webserver is configured to parse .php, it actually is nothing more than renaming .html files to .php… then insert this snippet at the very top of the former .html file: ```
<?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>
I did the simple solution and renamed html to php with the php-text on top, updates perfectly. Now, the only challenge will be to make sure regular visitors clear their cache so the new index.php loads in stead of their old cached index.html. At least this will be the way I do it from now on in future projects, mayhaps a bit more complex of course.
I’ve got a job interview for a flight attendant position on monday which would mean exellent pay and exellent work for me, here’s crossing my fingers!