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. Quote Link to comment 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 Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment 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 ??) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.