11.07.2015 Views

AJAX and PHP

AJAX and PHP

AJAX and PHP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Server-Side Techniques with <strong>PHP</strong> <strong>and</strong> MySQLFigure 3.10: Opera Denying Access5. Now try to load the very same HTML file but directly from the file system. The pathto the file should be like file:///C:/Apache2/htdocs/ajax/foundations/ping/ping.html. With the default options, Internet Explorer will run with noproblems, because the page is located in a trusted zone. Firefox will ask for aconfirmation as shown in Figure 3.11. Opera will display the very same errormessage that you saw in Figure 3.10.Figure 3.11: Firefox Asking for PermissionWhat Just Happened?Opera is indeed the safest browser in the world. You have no way of convincing Opera 8.5 toallow the JavaScript code to access a different server than the one it was loaded from.Internet Explorer behaves as instructed by the zones settings. By default, it will make your lifeeasy enough, by giving maximum trust to local files, <strong>and</strong> by asking for confirmation when scriptsloaded from the Internet try to do potentially dangerous actions.Firefox has to be asked politely if you want to have things happen. The problem is that by defaultit won't even listen for your polite request unless the script is signed, or loaded from a localfile:// location. However, requesting your visitor to change browser settings isn't a real optionin most scenarios.84

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!