@AlexanderLyakh
Python

Почему iframe зло?

И даже, если так, есть ли какая-то опасность для сайта, если я использую iframe с ссылкой на внутренние файлы сайта, по типу *.php?
  • Вопрос задан
  • 684 просмотра
Решения вопроса 1
approximate_solution
@approximate_solution
JS Developer. Angular\React\Vue\Ember
Этих причин кому-то достаточно. Но всё равно iframe юзают, и довольно часто.
Reason #1. Iframes Bring Security Risks

If you create an iframe, your site becomes vulnerable to cross-site attacks.

You may get a submittable malicious web form, phishing your users' personal data.
A malicious user can run a plug-in.
A malicious user can change the source site URL.
A malicious user can hijack your users' clicks.
A malicious user can hijack your users' keystrokes.

Don't put your visitors at risk to the XSS attacks.


Reason #2. Iframe Cause Usability Issues

The iframe tag is notorious for creating usability annoyances. Among most common of them are:

It tends to break the browsers' "Back" button.
It confuses visually impaired visitors, using screen readers.
It confuses users, suddenly opening the iframe content in a new browser window.
Content within the iframe doesn't fit in and looks odd.
Content within the iframe is missing since the source URL changed.
Navigation of the site in the iframe stops working.
Every in a page requires increased memory and other computing resources.

Find better ways to refer your visitors to external content instead of placing it within the iframe tag.
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
wisgest
@wisgest
Не ИТ-специалист
Нипочему. Это добро.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы