Optimizations
|
|
Optimizations
var url = window.location.href; window.location.replace(url.replace(url.substring(0,7), 'https://')); |
|
|
Thanks for the suggestion. This has been implemented. |
![]() ![]() |
JoeSimmons wrote: No you didn't, the substring is converted into a Regex which is used by replace(), this is slower I believe because the JS engine must convert the provided string into a regex before it can do it's work.
In the above the substring function needs to lookup 'http://' then 'http://' needs to be converted in to /http:\/\// Here is what I suggest:
using |

