Search found 41 matches

Search found 41 matches

Re: 302 Redirect is always disk-cached when ExpiresActive on & ExpiresDefault set

letxobnav wrote:
Mon Nov 04, 2019 12:16 am
so, I can only say, good luck.
Thank you for your kind words letxobnav. As soon as you wished me good luck, it came from ADD Creative!
God bless you )))
I have outlined the solution in my 1st post in this thread.

Jump to post
  • Mon Nov 04, 2019 1:38 am
  • Replies 14
  • Views 5654
Re: Cache-Control with $this->request->get

I want to thank you for your concise response. Your quote below is absolutely on-the-money! As OpenCart 2.x uses PHP sessions as long as session_start() is cal before response->redirect (which it is) PHP will internally set the correct cache control headers, regardless of weather you set any headers...

Jump to post
  • Mon Nov 04, 2019 1:03 am
  • Replies 17
  • Views 7358
Re: 302 Redirect is always disk-cached when ExpiresActive on & ExpiresDefault set

I gave
1. empirical evidence
2. a test you can replicate
3. testimonies from experts on browser redirection.

You have to understand that browsers do cache 302 redirection.
If you do not, you cannot help no matter how many years you have been developing.

Jump to post
  • Mon Nov 04, 2019 12:27 am
  • Replies 14
  • Views 5654
Re: 302 Redirect is always disk-cached when ExpiresActive on & ExpiresDefault set

No use arguing. I think the issue is summed up perfectly in my last post. Let's bring new info to the table. You said: no browser caches 302 redirection headers, there is nothing to cache, I told you this before as well. As I said before you are making conclusions based on wrong assumptions due to l...

Jump to post
  • Sun Nov 03, 2019 11:45 pm
  • Replies 14
  • Views 5654
Re: HTTP error 500 on product/special

Yes, that is what i did. My question is, when the error log doesn't show the problem, is ther something else I can do or look at? Hi Jen, Try adding this at the top of your index.php file. <?php error_reporting(E_ALL); ini_set("display_errors" , 1); Remember to remove it when you are done...

Jump to post
  • Sun Nov 03, 2019 11:04 pm
  • Replies 13
  • Views 1673
Re: 302 Redirect is always disk-cached when ExpiresActive on & ExpiresDefault set

'ExpiresByType text/html' does not actually === dynamically generated html. Don't understand this sentence. You should never cache dynamically generated html on any site. ...Nothing to do with static/dynamic. The browser does not know the difference. There you go. You answered your question yoursel...

Jump to post
  • Sun Nov 03, 2019 10:53 pm
  • Replies 14
  • Views 5654
Re: 302 Redirect is always disk-cached when ExpiresActive on & ExpiresDefault set

Are you saying that with OC 3.x the only solution is to give up on text/html caching? You should never cache dynamically generated html on any site. Bear in mind that 'ExpiresByType text/html' does not actually === dynamically generated html. I will actually have to give up on all the static text/h...

Jump to post
  • Sun Nov 03, 2019 10:32 am
  • Replies 14
  • Views 5654
Re: 302 Redirect is always disk-cached when ExpiresActive on & ExpiresDefault set

On the contrary, OC 2.x somehow manages to add a 'Cache-Control: no-store, no-cache, must-revalidate' header in relation to the 302 redirect.
How this is done is a mystery to me, but you can clearly see it in the screenshot below.

Jump to post
  • Sun Nov 03, 2019 10:19 am
  • Replies 14
  • Views 5654
Re: 302 Redirect is always disk-cached when ExpiresActive on & ExpiresDefault set

a browser never caches 302 redirects, in fact, it only caches 301 redirects. stop drawing conclusions on wrong assumptions. Well, if you do not believe me just download and install the cache_tester module from my first post and see for yourself. I am not here to joke around. My browser is actually ...

Jump to post
  • Sun Nov 03, 2019 10:09 am
  • Replies 14
  • Views 5654
Re: 302 Redirect is always disk-cached when ExpiresActive on & ExpiresDefault set

a browser never caches 302 redirects, in fact, it only caches 301 redirects. stop drawing conclusions on wrong assumptions. Well, if you do not believe me just download and install the cache_tester module from my first post and see for yourself. I am not here to joke around. My browser is actually ...

Jump to post
  • Sun Nov 03, 2019 10:01 am
  • Replies 14
  • Views 5654
Re: 302 Redirect is always disk-cached when ExpiresActive on & ExpiresDefault set

that is because $this->response->redirect does just that, redirect, it produces no output other than a location redirect 302 header That's just beautiful - but why is my browser caching it? letxobnav does your browser cache your 302 from oc 3.x? OC 2.3 does not do that for me. LOOK: Status Code: 30...

Jump to post
  • Sun Nov 03, 2019 9:27 am
  • Replies 14
  • Views 5654
Re: Cache-Control with $this->request->get

I have started a new thread which is more to the point here:
viewtopic.php?f=202&t=214613

Jump to post
  • Sun Nov 03, 2019 9:22 am
  • Replies 17
  • Views 7358
302 Redirect is always disk-cached when ExpiresActive on & ExpiresDefault set

I have created a small extension module, which includes only a single button which does a 302 redirect. For the life of me, I cannot get the redirect to STOP BEING CACHED by the browser!!! Even manually adding headers before the redirection! Can anybody suggest a solution to this 302 cache problem? ...

Jump to post
  • Sun Nov 03, 2019 9:17 am
  • Replies 14
  • Views 5654
Re: Cache-Control with $this->request->get

See https://github.com/opencart/opencart/issues/7008 for an explanation. I saw that, but did not immediately recognize a relation to my issue. Are you sure this is related to my issue? Thanks for your input. BTW, I have created a small extension module, which includes only a single button which doe...

Jump to post
  • Sun Nov 03, 2019 8:39 am
  • Replies 17
  • Views 7358
Re: Cache-Control with $this->request->get

are you hosted? if so, did you ask your host what they are setting in httpd.conf? Sorry for the confusion. It is because I have both OC 2.x & 3.x open side-by-side and I am comparing the response headers from the same action. First of all let me say that your solution is actually working 50% . ...

Jump to post
  • Sun Nov 03, 2019 1:04 am
  • Replies 17
  • Views 7358
Re: Cache-Control with $this->request->get

Thanks for your help. I followed your directions and modified the framework.php file. I cleared my local cache in Chrome. I set ExpiresActive off in .htaccess. My URL does not load from disk anymore, but I cannot get any 'Cache-Control' !!! Can you think of any reason why? The response headers I get...

Jump to post
  • Sat Nov 02, 2019 1:17 pm
  • Replies 17
  • Views 7358
Re: Cache-Control with $this->request->get

Are they basically allowing us to cache the 3.x responses using the ExpiresByType text/html directive in .htaccess?
I am guessing that this was not an option in 2.3 based on our discussion.?

Jump to post
  • Sat Nov 02, 2019 12:38 pm
  • Replies 17
  • Views 7358
Re: Cache-Control with $this->request->get

OC has nothing to do with cache headers, the only place OC sets those is in the file download scripts, nowhere else. Even the provided default htaccess file has no cache/expiration logic in it. So for OC installations this is a pure htaccess/httpd.conf issue. Somewhere in your new installation you ...

Jump to post
  • Sat Nov 02, 2019 12:32 pm
  • Replies 17
  • Views 7358
Re: Cache-Control with $this->request->get

CLARIFICATION: I have the same module installed in a 2.3.0.2 installation and in a 3.0.3.2 installation. Both have virtually identical .htaccess files. the URL is : https://example.com/admin/index.php?route=extension/shipping/mymodule&user_token=W0nBWaeKPjpeHFSMb4QmCqmt3sW7hA6Z&product_id=42...

Jump to post
  • Sat Nov 02, 2019 11:59 am
  • Replies 17
  • Views 7358
Re: Cache-Control with $this->request->get

Thank you letxobnav for replying so soon. Until last week I never even installed 3.x. I am facing these issues because I want to convert my modules to 3.x. So I am very new to 3.x. A. You said: 'that htaccess script is to prevent proxy and browser caching. So leave that, why would you want browser c...

Jump to post
  • Sat Nov 02, 2019 11:02 am
  • Replies 17
  • Views 7358

Search found 41 matches