- Mozilla and IE show totally different behaviour when fetching from remote pages (as is non-localhost pages)
- IE has a problem with XML Dom attributes for some strange reasons
- Images are not displayed correctly (because of relative paths in the page sources)
The XML Dom problem for IE was basically an (stupid) incorrectly checked unasigned.
As for the remote page fething, After some investigations, I came up with some hints :
a) Cross-domain fetching does not always work - Firefox has it disabled by default and fails the fetch, IE can enable it but will show a dialog asking for user confirmation when it tries to fetch the page.
b) It doesnt seem to work from Firefox even if I am in the same domain. IE behaves somehow strange : if I add the site to the "trusted" site's list, it denies acces to the page. Otherwise it prompts for confirmation and -WOW- works..But the refreshing of the IE page seems to have some troubles. This is not a primary goal (to get it to work on IE) since it will be displayed on an Opera browser anyway so I'll skip this for now.
There is a way to enable cross-domain fetches in Firefox (apparently Firefox doesn't recognize Windows being part of a Domain if you don't log on with a domain username..). Firefox has a run-time privilege structure for scripts (based on the old Netscape's Communicator one). By adding a call to the following function in a Javascript code :
netscape.security.PrivilegeManager.enablePrivilege()the script will be granted the privilege if:
a) the signature of the script is valid
b) codebase principal are enabled
Intresting page for prefs.js customization :
http://www.zachleat.com/web/2007/08/30/cross-domain-xhr-with-firefox/
The privileges that you can enable at runtime are :
UniversalBrowserRead | Reading of sensitive browser data. This allows the script to pass the same origin check when reading from any document. |
UniversalBrowserWrite | Modification of sensitive browser data. This allows the script to pass the same origin check when writing to any document. |
UniversalXPConnect | Unrestricted access to browser APIs using XPConnect. |
UniversalPreferencesRead | Read preferences using the navigator.preference method. |
UniversalPreferencesWrite | Set preferences using the navigator.preference method. |
CapabilityPreferencesAccess | Read/set the preferences which define security policies, including which privileges have been granted and denied to scripts. (You also need UniversalPreferencesRead/Write.) |
UniversalFileRead |
|
No comments:
Post a Comment