klewis
klewis

Reputation: 8350

How to replace http with https via javascript

I have the following rss object on my page...

data.data[i].link

and it produces the following URL...

http://

I would like the URL instead to start out with...

https:// 

What would be the easiest way to modify this?

Thanks for any advice

Upvotes: 8

Views: 18120

Answers (1)

user2516522
user2516522

Reputation: 196

data.data[i].link.replace('http://','https://');

Upvotes: 15

Related Questions