为什么开发人员讨厌iframe?

编程入门 行业动态 更新时间:2024-10-26 22:20:55
本文介绍了为什么开发人员讨厌iframe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

可能存在重复: iframe是否被认为是坏习惯?

对于网站开发人员,我总是听到他们说使用iframe是我们必须尽量避免的,有些人说这是不好的,令人讨厌的,并带来很多问题。

当我告诉我以前的老板不是开发者时,有一天我会使用iframe,他看着我是一个糟糕的开发者:)

我想要的是什么知道,iframes有一个非常糟糕的历史与web开发?

这是一场灾难吗?

我发现这是必须使用iframe,是说这意味着我是一个糟糕的开发人员?

或者所有这些因为它很难处理我们在开发过程中必须考虑的安全问题?

请求e如果你讨厌它,请列出你的观点,或者如果我错误地思考,请纠正我的观点。

解决方案

iframes can have similar issues作为框架并不恰当地使用 XMLHttpRequest :它们打破了单一URL的范例,这对网络的正常运行至关重要(思考书签,深层链接,搜索引擎,...)。

如果你正在创建一个web应用程序,可以使用你想要的任何技术(包括框架,flash,applets,$ whatever) 。如果您正在创建一个实际的,信息性的网页,请坚持使用无框架的HTML,CSS和简洁的JavaScript,并牢记该页面仍然可以在禁用脚本的情况下使用。

Possible Duplicate: Are iframes considered 'bad practice'?

While working with web developers, I always hear from them that using iframes is something we must avoid as we can, and some say it's something bad, annoying and makes a lot of problems.

Also when i told my previous boss "not a developer" one day that i will use iframe, he looked at me as a bad developer :)

What i want to know, does iframes have a very bad history with web development?

Is it a disaster?

In some cases I see that it's a must to use iframes, is saying that means I am a bad developer?

Or all of that because of it's hard to deal with because of some security issues we must take care about while developing?

Please list your points if you hate it too or correct me if I am thinking the wrong way.

解决方案

Iframes can have similar issues as frames and inconsiderate use of XMLHttpRequest: They break the one-document-per-URL paradigm, which is essential for the proper functioning of the web (think bookmarks, deep-links, search engines, ...).

If you're creating a web application, use whatever technique you want to (including frames, flash, applets, $whatever). If you're creating an actual, informational web page, stick to frameless HTML, CSS and unobstrusive JavaScripts and keep in mind that the page should still be usable with scripting disabled.

更多推荐

为什么开发人员讨厌iframe?

本文发布于:2023-08-01 15:47:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1269614.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:开发人员   讨厌   iframe

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!