Jump to content

force users to see latest content of page


toolman

Recommended Posts

Hi there,

I have updated a webpage and it appears that some users are still seeing the older version of the page. Is there a way I can force the user's version of the page to display the latest content on the page?

I have see I can add some meta tags which control the cache, but my site relies quite heavily on cookies, so I guess clearing the cache would reset/have an effect on the cookies?

Does anyone have any ideas on how I can make users always see the latest content?

Thanks!

Link to comment
Share on other sites

Add some PHP to the top of your page setting the header to not cache the page.

<?php
 
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
 
?>

Or if you must use plain HTML.

 

 

<meta http-equiv="expires" content="Sun, 01 Jan 2014 00:00:00 GMT"/>
<meta http-equiv="pragma" content="no-cache" />
Edited by Xaotique
  • Like 1
Link to comment
Share on other sites

  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.