Sorry for the really long question. I've been troubleshooting this for a while and figured I'd share everything.
I'm running vBulletin 5.1.5 (don't give me a hard time for this) and I'm trying to figure out if a problem is with the vBulletin software or an Apache issue.
System: vBulletin 5.1.5, Apache 2.4.7, mod_expires, memcached
This problem occurs regardless of the local browser (Chrome and Firefox both do it).
I just did an upgrade from vBulletin 5.1.4 to 5.1.5, and this problem started occurring immediately after. vBulletin says that it's an Apache server problem and that they will only set content/headers as no-cache, or leave it alone.
If someone posts a reply to a thread and then goes back to the main forum page, the new reply doesn't show up as the latest (the topic still shows 0 replies). If they then go back into the thread, the reply doesn't show up until they refresh the page.
We've cleared the vBulletin system cache, deleted all cookies for the domain and cleared the local cache.
Through the Chrome developer tools (Network tab) I see the following:
When a page has been updated, shouldn't vBulletin be resetting the Date: in the HTTP header?
I make the original post at 15:12:05 UTC. I make a reply immediately after at 15:12:10 UTC. The page HTTP header still shows the Date: as 15:12:05 UTC. I leave the page and go to the main forum page, then return to the post. It STILL shows the HTTP Header Date: as 15:12:05 UTC until I refresh it. So.. the client isn't being told there's an update to the page. This is set by vBulletin, isn't it? Since the pages are create dynamically?
I turned debug on in the config file and looked at time stamps ((generated BY vbulletin at the bottom of each rendered page):
Initial Post - Current Time: Wed, 04 Feb 2015 11:31:39 -0500 After Comment - Current Time: Wed, 04 Feb 2015 11:31:39 -0500 Click on forum link - Current Time: Wed, 04 Feb 2015 11:31:03 -0500 Hit refresh - Current Time: Wed, 04 Feb 2015 11:33:12 -0500 Click on topic again - Current Time: Wed, 04 Feb 2015 11:31:39 -0500 Click refresh - Current Time: Wed, 04 Feb 2015 11:35:15 -0500
Note that when I click on the forum link I go back in time (even though I've made a new post). I refresh, we come back to the current time.
Then when I click on the topic again, the time stamp matches the initial post time - NOT the time after I made the comment. Once again, I refresh and we come back to the current time and the reply shows.
Looking at the logs:
- I click on new thread GET /forums/new-content/44 HTTP/1.1
- I make the post POST /forums/create-content/text/ HTTP/1.1
- The page refreshes GET /forums/forum/general/test-forum/28305-this-is-another-new-topic
- I add a reply POST /forums/create-content/text/ HTTP/1.1
- The reply shows up POST /forums/create-content/loadnode HTTP/1.1
- I go to the parent forum of the post GET /forums/forum/general/test-forum HTTP/1.1
- I click on the post, page displays and a POST /forums/ajax/api/node/incrementNodeview HTTP/1.1 and then GET /forums/foru...-another-testt HTTP/1.1
Everything has a status code of 200. Item 6 and 7 have a Cache-Control: max-age=3600 and the date and time of the original post.
Maybe I'm unsure as to how expiration works between the server and the client? Isn't the process from the client to the server supposed to be something like... pull down the original page and cache it locally. Request the same page later, send a request to the server for a header to see if the page has a new time, if they match then pull the local copy, if they don't match send the new copy. Apache has no idea whether the page has been updated or not - that is generated by vBulletin, correct?
Any thoughts?