is this normal and optimized?

CommentFileSizeAuthor
#3 media2.jpg476.79 KBprotools
#2 media.jpg1.33 MBprotools

Comments

stephen Piscura’s picture

Protools,

Can you please provide a little more information. I'm not sure i understand the problem you're encountering and what you're asking.

protools’s picture

StatusFileSize
new1.33 MB

media

I'm not an expert in iframe, but perhaps there is no need to download duplicates js and css

protools’s picture

StatusFileSize
new476.79 KB

on local machine with all optimization function enable on edit page i have 32 HTTP requests and onload 1,10 s - ok

I use Tiny editor and Media browser.

When i open media browser i have - +26 requests and + 4 s onload !

And one more question - why for Media browser I can't disable Library ? For media field it is possible, but not for Media browser ?

media2

devin carlson’s picture

Status: Active » Closed (works as designed)

From the Mozilla developer network:

The HTML inline frame element (

) represents a nested browsing context, effectively embedding another HTML page into the current page. Each browsing context has its own session history and active document. The browsing context that contains the embedded content is called the parent browsing context. The top-level browsing context (which has no parent) is typically the browser window.
An iframe is basically an entire web page. Since Media utilizes an iframe for the media browser, launching the media browser essentially loads an entire Drupal page (including all of the page resources such as CSS, JavaScript, images, etc) inside of the current page. Some effort is being made to transition away from using an iframe. See #1139514: Overhaul the media browser code to not use an iframe, and be more understandable, maintainable, and extendable for details.