cancel
Showing results for 
Search instead for 
Did you mean: 

How to reduce Logout to homepage redirect time from 5 secns to 2 secns?

SOLVED

How to reduce Logout to homepage redirect time from 5 secns to 2 secns?

Hi,

 

After Logout it is taking 5 secns to redirect to homepage

i want to reduce those time to 2 secns

how can i acheive this one ?

 

 

Thanks

Somu N

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to reduce Logout to homepage redirect time from 5 secns to 2 secns?

Hello @sekhar_n 

 

Here's an alternate solution too.

 

You can manage redirection using following files:

  1. vendor/magento/module-customer/view/frontend/web/js/logout-redirect.js
  2. vendor/magento/module-customer/view/frontend/templates/logout.phtml

 

As per my suggestion, you need to override these files in your custom theme or custom module.

 

Replace the below code:

 

return function (data) {
    $($.mage.redirect(data.url, 'assign', 5000));
};

with

 

return function (data) {
    $($.mage.redirect(data.url, 'assign', 2000));
};

Hope it helps.

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

View solution in original post

2 REPLIES 2

Re: How to reduce Logout to homepage redirect time from 5 secns to 2 secns?

Hi @sekhar_n,

Try the below stack solution.

https://stackoverflow.com/a/12956292

I hope it will help you!

Re: How to reduce Logout to homepage redirect time from 5 secns to 2 secns?

Hello @sekhar_n 

 

Here's an alternate solution too.

 

You can manage redirection using following files:

  1. vendor/magento/module-customer/view/frontend/web/js/logout-redirect.js
  2. vendor/magento/module-customer/view/frontend/templates/logout.phtml

 

As per my suggestion, you need to override these files in your custom theme or custom module.

 

Replace the below code:

 

return function (data) {
    $($.mage.redirect(data.url, 'assign', 5000));
};

with

 

return function (data) {
    $($.mage.redirect(data.url, 'assign', 2000));
};

Hope it helps.

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.