I have a social media "newsfeed" page similar to FB and I am getting sync errors (with my AJAX sync service) which I am attributing to the browser and Umbraco caching the nuts out of the page.
If there a method to stop caching for just a single page?
I think I have the sorted the AJAX calls by appending a cache-buster timestamp to the URI. Is there a method of doing the same for Umbraco?
I know that there are meta declarations for page caching which seem to be ignored my most browsers.
The feed is rendered thru Angular JS. Returning to this page after a period causes some elements (server side) not to update without a F5. Additionally the update logic doesn't calculate model.length sizes correctly.
an CTRL-F5 refreshes the page and all is well.
I am saying is that even thou the page is reloaded, its running a cached version and not live.
This is an odd bug. I might be running a goose chase with the caching remark.
It seems that when you are logged in the page works just fine. If your session stop for any reason (inactivity) and you return to the page, cookie will log you in and the sync process fails to calculate the correct length of the model array in scope. Adding new comments at this time writes the data to the DB via AJAX but the sync fails, so the new comment does not appear. Clicking F5 resets the page and re-inits scope so all works again.
The main problem is trying to get this to fail dev side to debug the AJAX return object.
Stop Umbraco caching on per page basis
I have a social media "newsfeed" page similar to FB and I am getting sync errors (with my AJAX sync service) which I am attributing to the browser and Umbraco caching the nuts out of the page.
If there a method to stop caching for just a single page?
I think I have the sorted the AJAX calls by appending a cache-buster timestamp to the URI. Is there a method of doing the same for Umbraco?
I know that there are meta declarations for page caching which seem to be ignored my most browsers.
Any help gratefully received.
Hi Streety,
How do you render this feed ?
Umbraco doesn't cache page output unless you tell it to.
Dave
The feed is rendered thru Angular JS. Returning to this page after a period causes some elements (server side) not to update without a F5. Additionally the update logic doesn't calculate model.length sizes correctly.
an CTRL-F5 refreshes the page and all is well.
I am saying is that even thou the page is reloaded, its running a cached version and not live.
Hi Streety,
When you say this :
Do you mean just returning to the page without a browser refresh ? In that case it's normal that you don't see any updates in server side rendering.
If that's not the case and Ctrl-F5 shows server updates this mean your browser is somehow dictated to cache the response of the page.
Umbraco doesn't tell the browser to do this.
This probably done in your code or in the webserver configuration.
Without having a look at the code it's not possible to see what is causing this.
Dave
Many thanks for your comments.
This is an odd bug. I might be running a goose chase with the caching remark.
It seems that when you are logged in the page works just fine. If your session stop for any reason (inactivity) and you return to the page, cookie will log you in and the sync process fails to calculate the correct length of the model array in scope. Adding new comments at this time writes the data to the DB via AJAX but the sync fails, so the new comment does not appear. Clicking F5 resets the page and re-inits scope so all works again.
The main problem is trying to get this to fail dev side to debug the AJAX return object.
Many thanks.
is working on a reply...