TAILIEUCHUNG - Publishing AJAX and PHP - part 9

Vì vậy, các mã JavaScript chạy theo những đặc quyền bảo mật của tập tin HTML cha của nó. Theo mặc định, khi bạn tải một trang HTML từ một máy chủ, các mã JavaScript trong đó trang HTML sẽ được phép thực hiện các yêu cầu HTTP chỉ để máy chủ đó. Bất kỳ máy chủ khác là một kẻ thù tiềm năng, và (không may) những kẻ thù được xử lý khác nhau bởi mỗi trình duyệt. | Server-Side Techniques with PHP and MySQL So the JavaScript code runs under the security privileges of its parent HTML file. By default when you load an HTML page from a server the JavaScript code in that HTML page will be allowed to make HTTP requests only to that server. Any other server is a potential enemy and unfortunately these enemies are handled differently by each browser. Internet Explorer is a friendly kind of web browser which means that is arguably less secure but more functional. It has a security model based on zones. The four zones are Internet Local intranet Trusted sites and Restricted sites. Each zone has different security settings which you can change going to Tools Internet Options Security. When accessing a web resource it will be automatically assigned to one of the security zones and the specific security options will be applied. The default security options may vary depending on your system. By default Internet Explorer will give full privileges to scripts loaded from a local file resource not through a web server not even the local web server . So if you try to load c ajax . the script will run smoothly before execution you may be warned that the script you are loading has full privileges . If the JavaScript code was loaded through HTTP say http localhost ajax . . and that JavaScript code tries to make an HTTP request to another server Internet Explorer will automatically display a confirmation box where the user is asked to give permission for that action. Firefox and Mozilla-based browsers have a more restrictive and more complicated security model based on privileges. These browsers don t display a confirmation window automatically instead your JavaScript code must use a Mozilla specific API to ask about performing the required actions. If you are lucky the browser will display a confirmation box to the user and depending on user s input it will give the permission or not to your JavaScript code. If you aren t lucky the .

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.