-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[language filter] Review HTTP redirect codes #11206
[language filter] Review HTTP redirect codes #11206
Conversation
What's the benefit to not caching the second scenario? Something in my gut tells me this isn't the most optimal behavior. |
I have tested this item ✅ successfully on 38b92ae This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11206. |
no, we can not allow any redirection to be cached, that is what we fixed recently e.g. using language code in the URL for default language
now in this last case, we tell browser to cache it then we break the language switching again, that what we recently fixed |
Something still doesn't feel right but you're all the ones dealing with this behavior so I leave it to your capable hands. |
you are right that it would be nicer to allow caching of some redirects e.g. cache 301 for default language, i just say that this PR does not deal with the topic that you discuss, other PR have dealt with the above,
and this last purpose is succeeded in my tests that is why i marked a successful test |
Scenario: you have a site with If you use a 301 cached redirect. First time you access So we can't cache it. |
OK that makes sense. |
I have tested this item ✅ successfully on 38b92ae This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11206. |
RTC. We now get the correct redirections afaik This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11206. |
Pull Request for Issue #11165.
Summary of Changes
This PR reviews the HTTP status code of the redirects in the language filter plugins (current all are non cached 301 Moved Permanently).
After this PR the behaviour is the following:
/defaultlang*
to/*
(remove language code is set to Yes) = 301 Moved Permanently/*
to/defaultlang*
(remove language code is set to No) = 301 Moved Permanently (not cached)/*
to/otherlang*
(cookie language based redirect) = 302 FoundTesting Instructions
More info
See discussion in #11196