javascript - Webservice , JS, CSS are not working on HTTPS(Secure page) -
on website want apply https 1 of website page "securepage.aspx"
my website http://www.test.com/
and secure page https://www.test.com/securepage.aspx
my resources js/images in assets folder , webservices on root in commonwebservice folder.
http://www.test.com/assets/js/
http://www.test.com/assets/images/
when have applied https on secure page page did utilize css , js file in chrome browser i.e whole page messed up, have used there absolute url css , js.
in case webservice give 500 error on all browsers.
can suggest , guide me best way handle situation.
the behavior seeing frustrating, correct. when serve page https, must serve linked content under https well.
check our protocol-relative urls (http://paulirish.com/2010/the-protocol-relative-url/)
basically, this:
<img src="//domain.com/img/logo.png">
if page http, resource loads under http, , if http, loads securely, under https.
you must set server serve out css/js/ws content under both, 1 time do, relative link above allow switch seemlessly between two. links in master page, utilize relative format, , won't matter if content page running under http or https, resources pull same protocol page.
javascript asp.net css http https
No comments:
Post a Comment