johnsmith153 Posted November 11, 2010 Share Posted November 11, 2010 I want to set the correct header / cache values for a site. I am working on a social network / forum style site. I want to ensure that every page a user requests results in a fresh one being requested from the server as most content changes by the minute. (1) How would I set this? (2) Also, can I prevent nav bars being reloaded as these never, ever change. Link to comment https://forums.phpfreaks.com/topic/218438-php-header-cache/ Share on other sites More sharing options...
joel24 Posted November 11, 2010 Share Posted November 11, 2010 if you're pulling the page's content from a database it will automatically refresh the page each time the database is updated... the cache won't affect this Link to comment https://forums.phpfreaks.com/topic/218438-php-header-cache/#findComment-1133213 Share on other sites More sharing options...
johnsmith153 Posted November 11, 2010 Author Share Posted November 11, 2010 Are you sure? Can someone else confirm this as well? Link to comment https://forums.phpfreaks.com/topic/218438-php-header-cache/#findComment-1133218 Share on other sites More sharing options...
joel24 Posted November 11, 2010 Share Posted November 11, 2010 sorry, I mean automatically refresh the page each time it is loaded by the user. if you want it to automatically refresh like facebook etc, you'll need to use AJAX/jquery. Link to comment https://forums.phpfreaks.com/topic/218438-php-header-cache/#findComment-1133225 Share on other sites More sharing options...
johnsmith153 Posted November 11, 2010 Author Share Posted November 11, 2010 This is nothing to do with the question I am asking. Can someone else offer any help? Link to comment https://forums.phpfreaks.com/topic/218438-php-header-cache/#findComment-1133235 Share on other sites More sharing options...
BlueSkyIS Posted November 11, 2010 Share Posted November 11, 2010 use cache control headers before your content. this will cause all content (including nav) to be reloaded. Link to comment https://forums.phpfreaks.com/topic/218438-php-header-cache/#findComment-1133250 Share on other sites More sharing options...
johnsmith153 Posted November 12, 2010 Author Share Posted November 12, 2010 (1) Can you stop it from reloading the nav bar - as it would be better of course if it only reloaded parts that needed it? (2) If I didn't specify any headers, how much of an impact would it have? (e.g. new forum posts not seen for days or until user clears cache ??) Link to comment https://forums.phpfreaks.com/topic/218438-php-header-cache/#findComment-1133272 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.