Do Browsers Support Autocomplete For Ajax Loaded Login Forms At All?
Solution 1:
Autocomplete, in Firefox at least, triggers during page load. Adding the content afterwards would miss the window of opportunity.
A login form is tiny. I'd include it in the page from the outset and consider hiding it with CSS until it is wanted.
Solution 2:
In case it helps, msdn says (towards the bottom of the page):
Note: if both of the following conditions are true:
- The page was delivered over HTTPS
- The page was delivered with headers or a META tag that prevents caching
...the Autocomplete feature is disabled, regardless of the existence or value of the Autocomplete attribute. This remark applies to IE5, IE6, IE7, and IE8.
I've emboldened the interesting bit.
.
Solution 3:
I don't think you can get the form autocomplete to work if you load the form via ajax (security-wise I don't know if it can be really be abused or not, but the fact that a script could start loading fields into the page to see what data gets inserted doesn't look too good to me).
If you can, the best option would be to add a conditional block to the php file and include the form or not depending on whether the user is logged or not. If for some reason you can't do that, you might want to try to do a document.write() instead of the ajax call (and yes, using document.write is ugly :)
Solution 4:
I see case when login form has to be pulled with ajax - if rest of the website loads as static html (cache). Login form (or authed user info) cant be displayed statically.
So your solution is to pull the form right after declaration (end tag) of the DOM element that serves as parent element for ajax-pulled loginform's html, ex:
<divid="loginforms_parent"></div><scriptlanguage="javascript">/* ajax request and insert into DOM */</script>
And browser has the form in DOM onLoad. Tested, firefox does autocomplete in that case.
Solution 5:
I'm not happy with loading the login form into my page at load time so I filed a issue with Chrome instead;
http://code.google.com/p/chromium/issues/detail?id=123955&thanks=123955&ts=1334713139
Post a Comment for "Do Browsers Support Autocomplete For Ajax Loaded Login Forms At All?"