简体   繁体   中英

HTML5 iframes usage to skip loading intermediate html

I have a HTML page which I want to display on browser. This is a login page( https://localhost:9000/login ). Before loading this over browser page I want to hit another url which gives me another html page . This url is basically to kill the existing sessions.(https:xyz)But this also redirects me to another page which I don't want to display . I want to remain on login page.

I think this is possible using iframes. I am newbie to iframes. Any pointers on how to achieve this?

That's a local link only viewable on your computer.

So you want to load another page, before the login page? If you want to kill existing sessions you can use sessionStorage for that.

There are a few things that don't make sense with this, but it's your project. like you want to redirect to another page, but don't want that page to display. That makes no sense to me.

You want to remain on login page, but when you login, you want to get another html page in the login page?

iframes are probably the worst thing in the world imo... you got so much going on here, but can simplify this so much. A login page to an inner page and then you go from there.

There are a number of ways to achieve the end means here, sessionStorage being one. Just search around here for answers, you can find a ton of them.

Good luck!

iframes have been removed from HTML specifications, you cannot use them in HTML5.

Use attribute target="_blank" in the <a> of this url. It will open in a new tab

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM