After Logout it is taking 5 seconds to redirect to Homepage
.
I want to reduce those time to 2 seconds.
How can I achieve this one ?
Thanks.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityAfter Logout it is taking 5 seconds to redirect to Homepage
.
I want to reduce those time to 2 seconds.
How can I achieve this one ?
Thanks.
Copy this file :
\vendor\magento\module-customer\view\frontend\web\js\logout-redirect.js
to
\app\design\frontend\Vendor\Theme\Magento_Customer\web\js\ogout-redirect.js
change
$($.mage.redirect(data.url, 'assign', 5000));
to:
$($.mage.redirect(data.url, 'assign', 2000));
Run this command : php bin/magento c:f
I hope this will help you.
If answer is true than accept it and mark it. So it will help to other people.
override vendor/magento/module-customer/view/frontend/web/js/logout-redirect.js
to app/design/frontend/<Vendor>/<Theme>/Magento_Customer/web/js/logout-redirect.js
and add below code
define([
'jquery',
'mage/mage'
], function ($) {
'use strict';
return function (data) {
$($.mage.redirect(data.url, 'assign', 2000));
};
});
After override hit below commands
php bin/magento setup:static-content:deploy -f
php bin/magento ca:cl
php bin/magento ca:fl
please do not change directly in the core module because when you upgrade Magento then these changes automatically removed.
You need to change in logout-redirect.js
define([
'jquery',
'mage/mage'
], function ($) {
'use strict';
return function (data) {
$($.mage.redirect(data.url, 'assign', 2000));
};
});
and change the message from logout.phtml