Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iFrame Best Practices

Tags:

html

css

iframe

I have a large, hi-def JavaScript-intensive image banner for a site I'm designing. What is everyone's opinion of using iframes so that you incur the load time only once? Is there a CSS alternative to the iframe?

Feel free to preview the site.

It is very much a work in progress. ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

like image 822
Kyle Noland Avatar asked Aug 20 '08 01:08

Kyle Noland


People also ask

Is it good practice to use iframe?

Google recommends refraining from creating iframes. At there Webmasters Help Forum, Google clearly stated that iframes may cause problems for them: IFrames are sometimes used to display content on web pages. Content displayed via iFrames may not be indexed and available to appear in Google's search results.

Are iFrames still used in 2021?

<iframe> is not an obsolete or deprecated tag. It's still widelly used in the web, mostly for media purposes.

Are iFrames bad for performance?

iFrames tend to neither help nor hurt your search engine ranking. For this reason, it's best to refrain from using iFrames on main pages that you want to rank high in search engine results. Instead, fill high-priority pages with useful, unique content and save iFrames for other pages.

Is there a better way than iframe?

Use the object Tag as an Alternative to Iframe in HTML The object tag is an alternative to the iframe tag in HTML. We can use the tag to embed different multimedia components like image, video, audio, etc. The object tag has an attribute data where we can define the URL of the webpage to be embedded.


1 Answers

I should also have mentioned that I would like the banner rotation to keep moving. When the visitor clicks on a link, the banner rotation starts over. It would be nice if the "animation" kept rotating, regardless of the page the user visits.Blockquote

Well, in that case I would strongly recommend not doing that. The only real way of achieving that is to have the actual website content in the iframe, which means that you suddenly have lots of negative sides to the site: not being able to bookmark urls easily due to the address bar not changing; accessibility concerns; etc

I think you'll find that most people won't care that it reloads again. Once a visitor lands on your website, they'll marvel at the wonderful banner immediately, and then will continue to ignore it while they browse your site - until an image they haven't seen appears and distracts them away from your content.

Keep the rotation random enough, and with enough images, and people will stop to look at it from whatever page they're on.

like image 146
mercutio Avatar answered Nov 13 '22 15:11

mercutio