Jump to content

Weird Caching


unemployment

Recommended Posts

How can you prevent your browser from caching a page? I think that my news feed is being cached and is causing new posts to not be displayed even after a refresh. Eventually, the posts will show up after about 20 refreshes. I know my query is right so I didn't know if there was a way to stop page caching.

 

I don't really know if it is a caching issue though. I'm starting to think I just have some weird bug in my code because sometimes on refresh news feed items get removed then i'll refresh again and some will get added back in then i'll refresh again and they'll all be there. Ever heard of this happening?

Link to comment
https://forums.phpfreaks.com/topic/236960-weird-caching/
Share on other sites

to adress your question...you can add meta tags to certain pages so they will not cache...

use

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

along with

<META HTTP-EQUIV="Expires" CONTENT="-1">

 

I tried that and I still was getting the weird caching.  Anything else it could be?

Link to comment
https://forums.phpfreaks.com/topic/236960-weird-caching/#findComment-1218027
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.