Code: Select all
session_start();
if (!isset($_SESSION['refreshed'])) {
$_SESSION['refreshed'] = true;
echo '<script type="text/javascript"> window.location.reload(true); </script>';
exit();
}
Code: Select all
session_start();
if (!isset($_SESSION['refreshed'])) {
$_SESSION['refreshed'] = true;
echo '<script type="text/javascript"> window.location.reload(true); </script>';
exit();
}
v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.
v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.
Seriously, you have been a member of this forum for long enough to know that, if you want some help here, you have to provide some more details.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Code: Select all
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Expires: Thu, 01 Jan 1970 00:00:00 GMT");
header("Pragma: no-cache");
v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.
Even so, I agree with Jeff - you've been here long enough to know you should be more specific and provide more information. In this case for example OpenCart has several caches - vQmod cache, OCMOD cache, twig cache, browser cache etc. etc. You didn't tell us which one you wanted to avoid. The golden rule is be really specific.
I will mark this [SOLVED].
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
adding:Joe1234 wrote: ↑Mon Dec 16, 2024 3:03 am@JNeuhoff, I appreciate you always helping, but you always say the same thing. I provide all the info that I have or think is needed. If there is something more specific that you think is necessary, then ask for it and I will provide it if I have it. I don't know what I don't know. But each time others are able to provide what I need, or help me think in a different way to resolve the issue with the info that I provide that you say is not enough, so I don't understand what you are asking for. Like in this situation, I have no idea what more you could need; I'm asking if there is something that I can do differently than what I have to achieve the same goal, and I'm showing you what I have...it's clear to me. ADD understood the issue with the provided info and was able to point me to where I was thinking differently and play around to figure things out. So just tell me what you need and I'll get it, otherwise I'm only able to give what I think I got.
@ADD Creative, The Cache-Control and Expires is set to 5 days out which is in alignment with my htaccess.
I figured out exactly what I needed and put this at the top of the controller which fixed the issue...but I swear I tried doing it before but ended up with a 500 error which lead me to doing the other thing.Also, in playing around with the code, I see I don't need the javascript reload, all I need is "session_start();". Out of curiosity, will that affect the session that OC establishes?Code: Select all
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Expires: Thu, 01 Jan 1970 00:00:00 GMT"); header("Pragma: no-cache");
Code: Select all
$response->addHeader('Cache-Control: no-store');
Code: Select all
$response = new Response($registry);
Users browsing this forum: No registered users and 16 guests