Let the browser choose the protocol
You should deliver all web content over
https. In 2021 browsers are displaying increasingly obtrusive warnings when content is delivered over
Use protocol independent URLs whenever possible so that the browser will choose the protocol related to the protocol which the page is delivered with.
- When your page is delivered via
httpsand you provide a youtube video only via
httpthe most browsers (e.g. Firefox, Chrome) won't display the video.
- When you deliver your youtube video via
https://youtu.be/jyElDp98HdIyour test which checks that the embeded video is rendered in the view will fail because your test server doesn't use https
Let your links look like
//youtu.be/jyElDp98HdI and you will be fine, server side and test side.
Flaky tests are tests that sometimes fail for no obvious reason. They are the plague of many end-to-end (E2E) test suites that automate the browser through tools like Capybara and Selenium.
Join our free training event and learn to fix any flaky test suite, even in large legacy applications.