unemployment Posted May 20, 2011 Share Posted May 20, 2011 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 More sharing options...
fugix Posted May 20, 2011 Share Posted May 20, 2011 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"> Link to comment https://forums.phpfreaks.com/topic/236960-weird-caching/#findComment-1218023 Share on other sites More sharing options...
unemployment Posted May 20, 2011 Author Share Posted May 20, 2011 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 More sharing options...
fugix Posted May 20, 2011 Share Posted May 20, 2011 hmm thats interesting...well the tags will prevent caching...so it is most likely something in your code Link to comment https://forums.phpfreaks.com/topic/236960-weird-caching/#findComment-1218037 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.