avoiding a reposting refresh on iframe activation

Bug reports and enhancement requests
Post Reply
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

avoiding a reposting refresh on iframe activation

Post by al_9x »

Fx 4.0.1, NS 2.1.1.2rc3, new profile, forbid iframe on trusted, allow the test page

test page:

Code: Select all

<form method="post">
<input type="submit">
</form>
<iframe width="0" height="0" frameborder="0" src="http://www.google.com/">
</iframe>
  1. load the test page from a server
  2. click submit
  3. activate the iframe
  4. NS decides to refresh the page which results in:

    Code: Select all

    To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier.
    
  5. Should a refresh be happening at all? I vaguely remember a discussion about invisible utility plugins, but do those reasons apply to iframes?
  6. Even if a refresh is advisable, perhaps it should avoided in cases of reposts?
Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: avoiding a reposting refresh on iframe activation

Post by Giorgio Maone »

al_9x wrote: [*] Should a refresh be happening at all?
No it shouldn't.
If it does, it's a bug (only the frame content should be refreshed).

Investigating...
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: avoiding a reposting refresh on iframe activation

Post by al_9x »

Giorgio Maone wrote:
al_9x wrote: [*] Should a refresh be happening at all?
No it shouldn't.
If it does, it's a bug
It does, you don't need to post first, that just makes it visible to the user.
There is no refresh without frameborder="0", which makes the iframe size > 0, you are probably just treating it the same as a plugin?

So there are two issues here:

1) getting rid of the unnecessary refresh on 0 size iframe activation
2) for cases where refresh is deemed advisable ((nearly)invisible plugins?), I think it's best to avoid it if it leads to reposts and warning. What do you think?
Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: avoiding a reposting refresh on iframe activation

Post by Giorgio Maone »

al_9x wrote: 1) getting rid of the unnecessary refresh on 0 size iframe activation
Yes. It's significantly less likely to need being scripted by the parent page.
al_9x wrote: 2) for cases where refresh is deemed advisable ((nearly)invisible plugins?), I think it's best to avoid it if it leads to reposts and warning. What do you think?
Probably.
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: avoiding a reposting refresh on iframe activation

Post by al_9x »

confirmed
Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Post Reply