Same Origin Policy and AJAX

michelle.dsouza at utoronto.ca michelle.dsouza at utoronto.ca
Thu Nov 26 18:51:06 UTC 2009


Hi Boyan,

I had a memory slip this morning when we were talking about tests. The  
tests I was showing you - UIOptions tests - use AJAX to pull in an  
HTML template that the tests require for them to run. This works fine  
when the tests are served up such as on the build server. When running  
from the file system, Firefox has a same origin policy which causes  
the template fetch to fail. I momentarily forgot about this because I  
generally alter my browser settings to ignore the same origin policy.  
By doing this I can run ajax from the file system. If you want to  
alter your browser settings you need to type "about:config" in your  
firefox address bar and set the security.fileuri.strict_origin_policy  
to false. You don't need to do this but just keep in mind that if you  
don't anything that uses ajax will fail when you load it from the file  
system. Do I ever feel silly!

Hope this helps,

Michelle






More information about the fluid-work mailing list