At my current work, we have a feature called custom pages. This feature provides a bare bones CMS for administrators to make custom page posts. We then display these posts inside an iframe. The iframe contents are served over https. However, users might publish links that serve up content over http. Unfortunately what will happen if a user tries to click the link in an evergreen browser is that the browser will block the link from navigating away. This effectively causes the iframe to display no content.
We were thinking of the best way to force all links to open in a new tab. We thought we had a few options:
We were thinking of the best way to force all links to open in a new tab. We thought we had a few options:
- Modify all anchor tags to have a target="_blank" attribute
- Use an event handler to handle all click events on anchor tags to open a new tab
It turns out there is an even easier and more elegant option, the base tag. This tag has 2 attributes: href and target. The href attribute forces all anchor tags to use the specified value as the base url for all relative links. The target attribute forces all anchor tags to use that value for navigating. It's important to note that individual anchor tags can still override the value in the base tag.
So there you have it, force all links to open in a new window with a very simple html tag.
Definitely an obscure one... don't think I've ever seen it used before. It seems mostly redundant and/or user-unfriendly, but an ingenious use to dig yourself out of iframe hell.
ReplyDeleteIt definitely doesn't have much of a use these days that I can think of, except this one.
Delete
ReplyDeleteThank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me.
Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me.
Best Cartoon Portrait Maker
Caller id apps download
Free Offline Fighting Games
Free Call Recorder Apps
Thanks for sharing such a valuable information sap institute in Hyderabad
ReplyDeleteThis is such an inspiration for the new bloggers out there (like me)! But I just wanted to come by and say I love your posts and the amount of effort you put into each one. Your blog layout is also SUPER cute. Keep up the amazing work. :)
https://mypaperedit.com/blog/the-difference-between-abstract-and-introduction
Can’t find a reliable service to order your paper from. Check our https://scamfighter.net/review/essaybot.com on Scamfighter. Only real reviews based on personal experience and clients’ experience.
ReplyDeleteThank you for useful information. extraessay review
ReplyDeleteSuch a great blog – bright and informative. Thank you for your opinion and helpful articles. https://speedypaper.com/reviews
ReplyDeleteilovetyping
ReplyDeleteBA Exam Result - BA 1st Year, 2nd Year and 3rd Year Result
ReplyDeleteBsc Exam Result - Bsc 1st Year, 2nd Year and 3rd Year Result
who provides Graphic services, web designing services, logo design services, graphic design
ReplyDeleteand all kind of website design,Graphic services.
Freelance Graphic Designing:
Freelance Catalogue Designing in delhi
Freelance Catalogue Designing in gurgaon
Freelance Brochure Designing
Freelance Label Designing
Freelance Banner Designer
Freelance Poster Designer
graphic design services in delhi
graphic design services in gurgaon
Freelance Catalogue Designing in delhi
Freelance Catalogue Designing in gurgaon
Freelance Brochure Designing
Freelance Label Designing
Freelance Banner Designer
Freelance Poster Designer
graphic design services in delhi
graphic design services in gurgaon
Freelance Catalogue Designing in delhi
Freelance Catalogue Designing in gurgaon
Freelance Brochure Designing
Freelance Label Designing
Freelance Banner Designer
Freelance Poster Designer
graphic design services in delhi
graphic design services in gurgaon
Freelance Catalogue Designing in delhi
Freelance Catalogue Designing in gurgaon
Freelance Brochure Designing
Freelance Label Designing
Freelance Banner Designer
Freelance Poster Designer
graphic design services in delhi
graphic design services in gurgaon
Nice blog! i'm also working with a Digital marketing company in gurgaon
ReplyDeletewebsite designing in gurgaon
best website design services in gurgaon
web company in delhi
web desiging company
web design & development banner
web design & development company
web design & development services
web design agency delhi
web design agency in delhi
web design and development services
web design companies in delhi
web design company delhi
web design company in delhi
web design company in gurgaon
web design company in noida
web design company list
web design company services
web design company website
web design delhi
web design development company
web design development services
web design in delhi
web design service
web design services company
web design services in delhi
web designer company
web designer delhi
web designer in delhi
web designers delhi
web designers in delhi
web designing & development
web designing advertisement
web designing and development
web designing and development company
web designing and development services
web designing companies in delhi
web designing company delhi
web designing company in delhi
web designing company in gurgaon
web designing company in new delhi
web designing company in noida
web designing company logo
web designing company sites
web designing company websites
web designing delhi
web designing in delhi
web designing in gurgaon
web designing in gurgaon
web designing service
web designing services
web designing services delhi
Hyalurolift Cream
ReplyDeleteSite officiel (Magasinez maintenant) :- https://www.dietarycafe.com/hyalurolift-avis-fr/
Visitez maintenant plus d'informations:-
http://dietarycafe.mystrikingly.com/blog/hyalurolift
https://sites.google.com/site/dietarycafe/hyalurolift
https://medium.com/@dietarycafe/hyalurolift-411075288fcf
https://dietarycafe.blogspot.com/2019/12/hyalurolift.html
http://thedietarycafe.over-blog.com/hyalurolift
https://www.completefoods.co/diy/recipes/hyalurolift-avis-2
Hyalurolift Creme est un remède naturel anti-vieillissement qui inhibe la production de radicaux libres et fournit les meilleurs ingrédients pour le meilleur résultat.
I, allegedly, have to be necessitated to sense Crypto Bitcoin. What I presume is that I must have a prepossession about Crypto Bitcoin.
ReplyDeleteBitcoin Era
http://wealthcode.over-blog.com/bitcoin-era-erfahrung
https://www.facebook.com/bitcoinera.official/
I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again.
ReplyDeleteBCOM 2nd Year TimeTable 2020
Is it okay to buy a literature review? I have read a book but I do not have tome to write a review. I wonder what you think. I do not want to cheat at the meantime.
ReplyDeleteThis is a very interesting blog. I like to spend time on interesting blogs. I found a person who can check my paper for plagiarism. I really like to study. With additional sources of information it's easy.
ReplyDelete