PDA

View Full Version : about:blank in index.php


PreyCor
07-09-05, 07:09 PM
dotProject Version: 2.0.1

What is the relevance of this line in the index.php in the root of the dotProject folder?

echo '<iframe name="thread" src="about:blank" width="0" height="0" frameborder="0"></iframe>';

I've removed the line in my running system without any ill side effects - because the above simply does nothing of relevance!

caseydk
09-09-05, 09:14 AM
By having a 0x0 iframe, you can do a form submission to IT instead of to the page as a whole. Therefore, you can have all kinds of nifty Javascript in the background doing calculations from fields you've updated and then updating the data on the screen... all without a refresh or an explicit submission.

I've been doing this sort of thing for about a year and a half... think of it as AJAX without the XML and the nifty name.

PreyCor
09-09-05, 06:05 PM
ok, I can see value in that... let me describe why this became a problem to me - perhaps there is another way of implementing the 0x0 frame...

I'm using a reverse accelerator in front of the dotProject website (among others). One of the things the reverse accelerator does is SSL encryption of everything passing through it. This takes the pressure off the web server.

What ends up happening with the iframe inclusing is that the user gets a popup asking whether the browser should show both secure and unsecure objects... everything is actually being delivered through HTTPS, except the about:blank page because it's a special kind of page who's meaning is interpreted by the browser, not the web server.

Perhaps another way of implementing this would be to actually make a blank page and include it in the same way?

caseydk
11-09-05, 12:32 AM
Yep, quite easy. Put a empty html file in your dotproject structure (blank.html maybe?) and then replace about:blank with that complete URL.

The 0-sized file will be loaded instead and since it's under the same structure, it should be via SSL.

PreyCor
12-09-05, 05:16 PM
Good suggestion. Would it be possible to add this as a standard implementation for future versions of dotProject?