- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2020
10:17 PM
02-27-2020
10:17 PM
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
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2020
10:35 PM
02-27-2020
10:35 PM
Hello @sekhar_n
Here's an alternate solution too.
You can manage redirection using following files:
- vendor/magento/module-customer/view/frontend/web/js/logout-redirect.js
- 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.
200+ Magento 2 Extensions for Enhanced Shopping Experience.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2020
10:29 PM
02-27-2020
10:29 PM
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!
Try the below stack solution.
https://stackoverflow.com/a/12956292
I hope it will help you!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2020
10:35 PM
02-27-2020
10:35 PM
Hello @sekhar_n
Here's an alternate solution too.
You can manage redirection using following files:
- vendor/magento/module-customer/view/frontend/web/js/logout-redirect.js
- 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.
200+ Magento 2 Extensions for Enhanced Shopping Experience.