Shopping cart widget on does not always refresh in template header
Author: C. M.Dear Gentlemen,
I am using WebSiteX5 V.12 professional.
I have added the shopping cart widget displaying number of items in cart and total cart invoice value in the web site template header, so that this is visible at all times in the website. I have also created in the same place a button linking to the wsx5 shopping cart page.
It is functioning as expected, not however all of the time refreshing.
In particular, there are cases when while navigating throught my website pages adding products to the cart and doing other things as a user, even though there are items in the shopping cart, the widgets are sometimes (and randomly) showing 0 items, 0 invoice value.
As expected, when I force the browser to refresh, then the problem is resolved.
This behaviour is creating confusion to the end user of the site.
Any ways to resolve the issue?
Thank you for your continuous support.
Regards
Hello C.M.,
Do you have 'Expires Headers' set on the server to enable caching of JavaScript and PHP files? If so, then switch this off completely and retest.
Kind regards,
Paul
Author
Thanks Paul.
I will check my Apache server on the state of its caching policy.
Just as a clarification prior to making any changes: you are referring to setting the Expires Headers completely off ONLY for JS and PHP files, right?
Yes, only for those files specifically
Author
Dear Paul,
I checked the Apache server settings (running WAMPSERVER 2.5 on a development environment) and the "Expires Headers" module was turned off (commented out in the httpd.conf file).
Therefore, the solution lies somewhere else.
Hello C. M.,
You are making the tests only locally?
Can you please also make a test online to see if then it works correctly?
In case this should not help please write me the link to the website online.
Many thanks!
Author
Claudio, taking the web site online is scheduled to happen in about three weeks from now.
I am only performing the tests locally on a development environment, where server and client lie on the same PC.
What I can do though is run it over a LAN separating client PC from server PC.
Will this suffice to achieve the effect you are recommending?
Hello C. M.,
You can try to see if it works but it would be better to make a test on the server where later it will be published. As example you could upload it in a subfolder so it won't be visible but you can test it correctly.
Many thanks!
Author
Dear Claudio,
Thanks for your reply.
I tested it with separate machines running client and server, and I can confirm that the problem persists. I am sure that with proxy servers in between on a live environment, the caching issues will not get any better.
Let's wait as you suggest until I can have a live demo and then I will repost on this thread on access details.
Regards
Hello C. M.,
As soon as you have a live demo let me know. You can also set the post as private if you don't want to have the URL visible to others.
Many thanks!