• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 459
  • Last Modified:

Input into textarea slow when displaying documents in iframe


We are using an iframe to display documents in our web page*. Choosing the document sets the src of the iframe to an aspx page with some info in the query string. The page load adds the document to the response and it displays. That part works fine.

The problem is that when the iframe is displaying a document, typing into textareas on the page is painfully slow. You type, you wait, the input appears.


* I don't think it matters but the web page is created using web parts so the iframe is in one part and the text area is in another.
Code adding document to page response
protected void Page_Load(object sender, EventArgs e)
                WorkItem wi = SessionManager.Current.GetWorkItem(Request.QueryString["WorkitemId"]);
                using (Global360Service service = Global360ServiceFactory.Create(wi))
                    Global360WebServiceWrapper vs = service as Global360WebServiceWrapper;
                    if (vs == null) throw new Exception("Service could not be cast as a Global360WebServiceWrapper.");
                    string docExt = Request.QueryString["DocExt"];
                    Response.ContentType = Utils.Utils.GetMimeType(docExt);
                    Document doc = vs.WebService.GetDocument(Request.QueryString["DocumentId"], 0, -1, true);
            catch (Exception ex)
                TraceUtil.TraceError("FileDownload.aspx.cs.Page_Load", ex);
                throw ex;

Open in new window

1 Solution
HellaSymAuthor Commented:
Since submitting this, I've changed it so that instead of using the iframe I just open a brand new window. Same code I just use window.open(url) instead of iframe.src=url.

And with the document displaying in the new window the slowness goes away.

This is not ideal, since the users want to look at the document and type into the textarea (and the page the textarea is in will most likely be maximized) but it's better than the previous slowness.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now