Add AJAX parameter #45

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@riznmage

Our company uses some methods to load Magento blocks via AJAX and pushState. Could you add this 'ajax' parameter to the params array in order to tell apart AJAX from non-AJAX requests?

@riznmage riznmage Add AJAX parameter
Our company uses some methods to load Magento blocks via AJAX and pushState. Could you add this 'ajax' parameter to the params array in order to tell apart AJAX from non-AJAX requests?
5956680
@GordonLesti
Owner

@riznmage thanks for the PR. Why didn't you fork, if just your company is doing like that?

@GordonLesti
Owner

@riznmage what do you mean? Maybe I can throw an event at this point and you can add your own params with your local code?

@riznmage

@GordonLesti I think that it will be helpful not only for our company, but for other people, who are using AJAX to load content, too. The non-AJAX cache would not interfere with the AJAX one. However, if you don't feel like doing it, or consider it stupid, you can throw an event, as you suggested, but this should happen before the serialization of the $params array.

@GordonLesti
Owner

@riznmage I'm sorry for letting this PR open for so long. I will find a solution in the next days.

@GordonLesti
Owner

I'm very very sorry, that I needed that long, but it wasn#t that easy for me to find a good solution for that problem. No you can put your own parameters via an event. here is an post that explains how to use those events http://gordonlesti.com/edit-cachetags-and-parameters-via-events-in-lesti_fpc-1-3-2/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment