0

We have developed this site: http://www.aloha-connect.com/

Our issue is that within this page, we have many frames.. in some cases, frame within a frame.

Our issue is, that on connections with low bandwidth. It can take a long time to load. We have tried using the php gzip code: to load, but we are noticing that the frame contents are not loading as quick. We then tried putting the code within the frame pages as well and didn't make any difference.

Same happens on this page as well http://aloha-connect.com/rates/

Any support/suggestions appreciated.

2
  • 1
    Why aren't you using include()? These iframes are on the same site so that would make sense to use.
    – kittycat
    Jan 18, 2013 at 22:59
  • If your bottleneck is network bandwidth then gzip compression can help load times. If your bottleneck is the server or client CPU then gzip compression can potentially be drastically worse, especially if you're using gzip-9 [highest compression] which usually has shockingly high CPU usage. edit: oh my god so many frames. Seriously, you don't need that many frames. criminy...
    – Sammitch
    Jan 18, 2013 at 23:07

2 Answers 2

1
  1. take a look at and attempt to fix any high and medium priority items from Google pagespeed
  2. get rid of the unnecessary frames (all of them). You tagged this as PHP, so use PHP include() to include content from other files. (As noted by @cryptic, you will have to edit the html from your included files so it will display properly)
  3. use CSS Sprites when you have lots of icons and small images. put your icons in one image, and then use CSS to only show the correct icon: http://css-tricks.com/css-sprites/
  4. compress all your CSS into one css file and all your JS into one minified JS file. How to minify JS or CSS on the fly
  5. use a CDN for jQuery.
2
  • Thanks, i will give this a good and get back. Fingers crossed it will work. Jan 18, 2013 at 23:03
  • @user1991890 you can't just include() as your files contain full HTML pages with additional markup so including them will break the layouts of the site and make the markup badly malformed. You need to edit each iframe's page to contain only the content you need to then include into the the parent page.
    – kittycat
    Jan 18, 2013 at 23:05
0

Are all the frames served from the same domain?

Keep in mind that browsers restrict the number of requests to the same domain. I think this is currently set to 2. This includes HTML pages, images, scripts, CCS files.

A common workaround is to host some resources on other domains, like cdn1.mydomain.com and cdn2.mydomain.com. This will allow the browser to fetch more resources at once, potentially all of them at once.

If you open the Net tab in Firebug or the Network tab in Chrome you can see which requests are pending.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.