MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE (OSS
Transcription
MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE (OSS
MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE (OSS) PROGRAMME INTERNET BROWSERS COMPARISON : Microsoft Internet Explorer VS Mozilla Firefox VS Google Chrome April 2012 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome Copyright The Government of Malaysia retains the copyright of this document. MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome Table of Contents SECTION 1: INTRODUCTION...................................................................................1 EXECUTIVE SUMMARY ..................................................................................................2 INTRODUCTION ..............................................................................................................2 SECTION 2 : PURPOSE OF EVALUATION ............................................................3 PURPOSE OF EVALUATION............................................................................................4 SECTION 3 : FEATURE COMPARISONS.................................................................5 COMPARISON...................................................................................................................6 SECTION 4 : DESCRIPTION OF EVALUATION METHODOLOGY.......................11 BENCHMARKING METHODOLOGY..............................................................................12 SECTION 5 : DISCUSSION OF RESULTS............................................................16 RESULTS:........................................................................................................................17 SECTION 6: CONCLUSION....................................................................................24 CONCLUSION ................................................................................................................25 SECTION 7: REFERENCES....................................................................................26 SECTION 8: APPENDIX..........................................................................................28 APPENDIX A....................................................................................................................29 APPENDIX B...................................................................................................................32 APPENDIX C...................................................................................................................51 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome SECTION 1: INTRODUCTION MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome EXECUTIVE SUMMARY A web browser or also known as internet browser is a software application that enables you to browse the world wide web, locating and accessing web pages. Browsers translate HTML code, allowing us to read text, view images, play videos and listen to audio clips on websites. They also interpret hyperlinks that allow us to travel to different web pages when clicked on. While web browsers are primarily intended to access the internet, they can also be used to access private information on web servers or through file systems. INTRODUCTION The purpose of this document is to give Public Sector agencies more knowledge and choices on the web browsers as well as to build confidence in considering or moving towards the open source. Below are the examples of some web browsers that can be downloaded for free:1. Google Chrome 2. Mozilla Firefox 3. Microsoft Internet Explorer 4. Opera 5. Safari 6. Maxthon 7. RockMelt 8. Mozilla SeaMonkey 9. Deepnet Explorer 10. Avant Browser For the benchmarking purpose, we chose three (3) different web browsers among the most widely used web browsers; Google Chrome, Mozilla Firefox and Microsoft Internet Explorer. The purpose of this benchmark report is to evaluate how each performs against the others in terms of security, HTML5 and CSS3 compliance and JavaScript support. Page 2 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome SECTION 2 : PURPOSE OF EVALUATION Page 3 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome PURPOSE OF EVALUATION We evaluated the three (3) web browsers to determine if any one provides better overall performance over the other two, which could result in productivity improvements for personal computer users. The web browser functionalities and tests that have been considered includes:- No Functionality/Test Benefits to the user 1 Security Enable safe internet surfing and help keep personal information such as password secure. 2 Feature Set Provide practical and convenient features that make surfing the web easy and fast. 3 Speed and Compatibility Browser should load quickly and be compatible with all major operating systems. A top web browser will load and navigate between pages within just a few seconds. 4 Ease of Use An intuitive layout that fosters easy and convenient navigation will help user in surfing the internet smoothly. 5 HTML5 and CSS3 Support Enable developer to organize content with new and meaningful way. This will enhance the user experience when browsing the internet. 6 Acid3 Help users checks how well a web browser follows certain selected elements from web standards, especially relating to the Document Object Model (DOM) and JavaScript . Page 4 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome SECTION 3 : FEATURE COMPARISONS Page 5 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome COMPARISON Features Google Chrome Mozilla Firefox Microsoft Internet Explorer Version Used 18.0.1025.151 11 9 License Google Chrome Terms and Services, BSD/LGPL Mozilla Public License (MPL), GNU Freeware General Public License (GPL), GNU Lesser General Public License (LGPL) Developer Google Inc. Mozilla Corporation Mozilla Foundation Microsoft Platform Android, Linux, Mac OS X (10.5 and later, Intel only), Windows (XP SP2 and later) Cross Platform Windows 7, Windows Vista Service Pack 2, Windows Server 2008 Service Pack 2, Windows Server 2008 R2, Windows Phone 7.5 System Requirement Minimum Requirement: Minimum Requirement: Minimum Requirement: Windows - Processor: Intel Pentium 4 or later - Memory (RAM): 128MB - Hard Drive: 100MB - OS: Windows XP Service Pack 2+ Windows Vista Windows 7 Windows - Processor: Pentium 4 or newer with SSE2 - Memory (RAM): 512MB - Hard Drive: 200MB - OS: Windows 2000 or higher Windows - Processor: 1GHz+ (32/64-bit) - Memory (RAM): 512MB - Hard Drive: 70MB - OS: Windows Vista 32-bit with Service Pack 2 (SP2) or higher Mac - Not available Mac Page 6 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome Mac - Processor: Any Intel processor - Memory (RAM): 128MB - Hard Drive: 100MB - OS: Mac OS X 10.5.6 or later Linux - Processor: Intel Pentium 3 / Athlon 64 or later - Memory (RAM): 128MB - Hard Drive: 100MB - OS: Ubuntu 10.04+ Debian 6+ OpenSuSE 11.3+ Fedora Linux 14 Security - allocate each tab to fit into its own process to "prevent malware from installing itself" and prevent what happens in one tab from affecting what happens in another. - Following the principle of least privilege. - Processor: Any Intel processor - Memory (RAM): 512MB - Hard Drive: 200MB - OS: MAC OS X Leopard (10.5) and above Linux - Not available Linux - Linux distributors may provide packages for your distribution which have different requirements. - Require the following libraries or packages: • GTK+ 2.10 or higher • GLib 2.12 or higher • Pango 1.14 or higher • X.Org 1.0 or higher (1.7 or higher is recommended) • libstdc++ 4.3 or higher - Sandbox security model. - limits scripts from accessing data from other web sites based on the same origin policy. It uses SSL/TLS to protect communications with web servers using strong cryptography when using the HTTPS protocol. It also provides support for web applications to use smartcards for authentication - Protect data from theft, hackers, and accidental loss - Defend computer against viruses, spyware, and other malware - Reduce risk by enhancing security and control - Helps in family protection with parental controls. Page 7 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome purposes. Ease of Use - makes Internet browsing simple and fast. - provides an added sense of security that prevents fishing from taking place. - allow user to add on a bunch of different features. - when opening a new tab you can get a visual sample of most visited websites, recently closed windows, applications & bookmarked pages. - Use the Omnibox to type both web addresses and searches in Chrome. - Signing in to Chrome brings your bookmarks, history, and other settings to all your computers. - runs fast and loads web pages at a rapid speed. - equipped with a search box that is simple to use, just about anyone can do it. - allow user to add on a bunch of different features and change the color skin of your web browser. - the new UI is minimalistic, pretty and polished. - The address bar has a dual function (paste&go and paste&search). - comes equipped with an updated search box, add-ons, plenty of extra features, and tabs for browsing. - Clean browser interface - One-click navigation to intelligently display websites that visited most often. - Familiar Windows interface. - Optimized controls and fewer interruptions; Navigation controls have been optimized based on what people use most and user notifications now appear in the notification bar at the bottom of the browser. Manageability - impressive usability, ease of use and a clean minimalistic streamlined interface with powerful tools. - it interface gives more room to the pages you are visiting. - the tabs are dynamic and detachable. Hence, dragging and dropping of tabs between - Switch to Tab feature will let you switch straight to the open tab of interest. - App tabs pins tabs as favicons in the tab bar on the far left, which glows when updated. - Tab panorama organizes tabs into manageable groups that can be named, organized and edited - stripped down interface, clean and simple, more focus on web content than the browser frame, with transparent top and side borders. - square edged tabs lie alongside the address bar by default (they can be moved down via the context menu). - the status, menu and tool bars are Page 8 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome windows has never been easier. - Since each tab exists in its own environment, when a page crashes in one tab the issue doesn't spread to the others (though memory leak seems to be a concern here). (press Ctrl+Shift+E). - Firefox Sync lets you synchronize browser bookmarks, history, passwords and even open tabs between different computers. all gone by default, while the button icon uses new artwork. - the new tab page opens up thumbnails of frequently visited websites Performance - designed to be fast and responsive in every possible way - Fast to start up - launches from your desktop within seconds. - Fast to load web pages - powered by the WebKit open source rendering engine - Chrome is fitted with V8, a more powerful JavaScript engine that we built to run complex web applications with lightning speed - User can type in both searches and web addresses in Chrome's combined search and address bar, known as the Omnibox. - the new Jagermonkey javascript engine running on top of Gecko 2.0 rendering engine makes it 6 times faster than FireFox3. - memory hog and RAM usage increases dramatically as more add-ons are used. - plugin processes are separated from the main process by plugincontainer.exe, thereby providing better stability. - freezing and crashing is greatly reduced than its former version. - caching improved - support parallel downloading which lead to faster page loading. - improved JavaScript performance (Chakra) that is faster than IE8. - DOM improvements - improved Cascading Style sheets (CSS) support. - support HTML5 video, audio and canvas tags as well as Inline SVG. Theme Users can install themes to User can change the theme using non-themeable Page 9 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome alter the appearance of the add-ons for firefox that can be browser. Many free third-party found at https://addons.mozilla.org themes are provided in an online gallery. Chrome also allow user to switch to classic mode. Page 10 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome SECTION 4 : DESCRIPTION OF EVALUATION METHODOLOGY Page 11 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome BENCHMARKING METHODOLOGY 1. Install three (3) web browsers:a) Google Chrome b) Mozilla Firefox c) Microsoft Internet Explorer 9 2. After done the installing part, we used http://www.browserscope.org to test the web browsers on Security, Rich Text, Selector API, Network, Acid3 and JKSB. Browserscope is an open-source project for profiling web browsers, storing and aggregating crowd-sourced data about browser performance. The advantages of crowd-sourcing:a) The ability for users to contribute results is the key for Browserscope's longevity, accuracy, and currency. b) No dedicated test resources are required; enabling the project to run in perpetuity. c) Tests are run under a wide variety of real world test conditions. d) Aggregating results reduces selection bias. e) New browsers show up immediately due to developer testing By using this method, a comparison was made on which web browser has the capability for retrieving, presenting, and traversing information resources on the World Wide Web. Page 12 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome BENCHMARKING REPORT Hardware Specifications The evaluation of Mozilla Firefox, Google Chrome and Opera web browsers was conducted on the same hardware specifications as listed below: • Processor : Intel (R) Core(TM) i5-2540M CPU @ 2.60GHz • Architecture : x64 processor • Memory : 8GB RAM • HDD : 500 GB • Operating System : Windows 7 Professional 64-bit Comparison and Evaluation Method A series of benchmarking activities were done at http://www.browserscope.org. Mozilla Firefox, Google Chrome and Opera web browsers shared same machine. From that website, the three (3) web browsers were compared using six (6) different test:No. Tests Descriptions 1 Security Measures if the browser supports JavaScript APIs that allow safe interactions between sites, and whether it follows industry best practices for blocking harmful interactions between sites 2 Rich text Covers browser implementations of content-editable for basic rich text formatting commands. Most browser implementations do very well at editing the HTML which is generated by their own exec Commands. But a big problem happens when developers try to make cross-browser web applications using content- editable - most browsers are not able to correctly Page 13 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome change formatting generated by other browsers. On top of that, most browsers allow users to paste arbitrary HTML from other web pages into a content-editable region, which is even harder for browsers to properly format. These tests check how well the exec Command, query Command State, and query Command Value functions work with different types of HTML. Please note that these are WYSIWYG editing tests, not semantic editing tests. Any HTML which produces a given visual style should be changeable via the exec Command for that style. 3 Selectors API Selectors API specification defines methods for retrieving Element nodes by matching against a group of selectors. It is often desirable to perform DOM operations on a specific set of elements in a document. These methods simplify the process of acquiring specific elements, especially compared with the more verbose techniques defined and used in the past. 4 Network Measures how long it takes for a resource to load, but the load time can vary greatly depending on the user's network latency. 5 Acid3 Test page from the Web Standards Project that checks how well a web browser follows certain selected elements from web standards, especially relating to the Document Object Model (DOM) and JavaScript. 6 JSKB This test contains side-effect free JavaScript expressions that expose information about a browser that can be useful to JavaScript code optimizers. Optimizers can get output in a JSON format. Scores on the test summary page are not meant to be a measure of the quality of a browser, but to indicate how many features are available as a predictor of how much redundant code might be eliminated on that browser. Page 14 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome Based on these five (5) criteria, each web browser was subjected to the same sets of testing:1. Security test (17 tests) 2. Rich Text test (18 tests) 3. Selectors API test (2 tests) 4. Network test (17 tests) 5. Acid3 test (1 test) 6. JSKB test (75 tests) For more details on each test, please refer to Appendix B. Page 15 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome SECTION 5 : DISCUSSION OF RESULTS Page 16 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome RESULTS: Test Method Google Chrome Mozilla Firefox 11.0 Microsoft Internet 18.0.1025.151 Explorer 9 Security 12/17 18/17 13/17 Rich Text 98/114 90/114 4/114 Selectors API 100% 100% 100% Network 12/16 13/16 11/16 Acid3 100/100 100/100 96/100 JKSB 81 81 80 Page 17 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 1. Security Test Security 18 16 14 12 10 8 6 4 2 0 Firefox Chrome IE Illustration 1: Result for security test for Firefox, Chrome and Internet Explorer browser. Web browser Scores Mozilla Firefox 12 Google Chrome 18 Microsoft Internet Explorer 13 Security test results (max 17 point) Based on these results, Chrome has the strongest security capabilities to measure whether the browser supports JavaScript APIs that allow safe interactions, and whether it follows industry best practices for blocking harmful interactions between sites. Page 18 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 2. Rich Text Test 100 90 80 70 60 50 40 30 20 10 0 Firefox Chrome Internet Explorer Illustration 2: Result for rich text test for Firefox, Chrome and Internet Explorer browser. Web browser Scores Mozilla Firefox 90 Google Chrome 98 Microsoft Internet Explorer 4 Rich Text test results (max 114 point) From this test, Firefox and Chrome has the best rich text capabilities in which they can best handle functions with different types of HTML as well as change formatting generated by other browsers. Page 19 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 3. Selectors API Test Selectors API 100% 80% 60% 40% 20% Firefox Chrome Internet Explorer Illustration 3: Result for selectors API test for Firefox, Chrome and Internet Explorer browser. Web browser Scores Mozilla Firefox 100% Google Chrome 100% Microsoft Internet Explorer 100% Selector API test results (max 100 percent) Based on these results, Firefox,Chrome and Internet Explorer are marginally stronger in this category. This means these web browsers are widely compatible against the elements in the CSS tree structure. Page 20 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 4. Network Test Network 12 10 8 6 4 2 Firefox Chrome IE Illustration 4: Result for Network test for Firefox, Chrome and Internet Explorer browser. Web browser Scores Google Chrome 12 Mozilla Firefox 13 Microsoft Internet Explorer 11 Network test results (max 16 points) Based on these results, Mozilla Firefox has the best result in supporting connections, capabilities in downloading scripts, caching and compression which can result in better performance during surfing the internet. Page 21 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 5. Acid3 Test Acid3 99 98 97 96 95 94 93 92 91 90 Firefox Chrome IE Illustration 5: Result for Acid3 test for Firefox, Chrome and Internet Explorer browser. Web browser Scores Mozilla Firefox 100 Google Chrome 100 Microsoft Internet Explorer 96 Acid3 test results (max 100 points) Based on these results, Firefox and Chrome are marginally stronger in this category. This shows that they are compliance with the elements of various web standards, particularly the Document Object Model (DOM) and Javascript. Page 22 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 6 JKSB Test JKSB 81 80.8 80.6 80.4 80.2 80 79.8 79.6 79.4 Firefox Chrome IE Illustration 6: Result for JKSB test for Firefox, Chrome and Internet Explorer browser. Web browser Scores Mozilla Firefox 81 Google Chrome 81 Microsoft Internet Explorer 80 JKSB test results (max 100 points) Based on these results, Mozilla Firefox and Google Chrome are marginally support more features that can be useful to Javascript code optimizers. Page 23 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome SECTION 6: CONCLUSION Page 24 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome CONCLUSION This benchmark report give us a pretty good picture of which browser is the fastest. In summary, Chrome web browser showed the best test results in security, rich text and network. Chrome is a very secure browser, light, open fast and has great themes. All tests seem to point to one conclusion and that is Chrome seems to be a light enough application that can start quickly, and keep your system from becoming to bogged down and will allow you to quickly move from site to site. The current trend also shows that more user are migrating to Google Chrome due to its advantages. Page 25 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome SECTION 7: REFERENCES Page 26 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 1. http://en.wikipedia.org/wiki/Web_browser 2. http://www.google.com/support/chrome/bin/answer.py?hl=en&answer=95411 3. http://www.mouserunner.com/FF_SystemRequirements.html 4. http://en.wikipedia.org/wiki/Google_Chrome 5. http://en.wikipedia.org/wiki/Firefox 6. http://browserscope.org 7. http://www.findmebyip.com/litmus/ 8. http://www.w3schools.com/browsers/browsers_stats.asp 9. http://internet-browser-review.toptenreviews.com/ 10. http://en.wikipedia.org/wiki/Internet_Explorer_9 11. http://en.wikipedia.org/wiki/Comparison_of_web_browsers#Accessibility_features Page 27 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome SECTION 8: APPENDIX Page 28 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome APPENDIX A 1. Example of Mozilla Firefox web browser Page 29 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 2. Example of Google Chrome web browser Page 30 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 3. Example of Internet Explorer web browser Page 31 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome APPENDIX B 1. Security test (17 tests) postMessage Checks whether the browser supports the HTML 5 cross-document messaging API that enables secure communication between origins. JSON.parse Checks whether the browser natively supports the JSON.parse API. Native JSON parsing is safer than using eval. toStaticHTML Checks whether the browser supports the toStaticHTML API for sanitizing untrusted inputs. httpOnly cookies Checks whether the browser supports the httpOnly cookie attribute, which is a mitigation for cross-site scripting attacks. X-Frame-Options Checks whether the browser supports the X-Frame-Options API, which prevents clickjacking attacks by restricting how pages may be framed. X-Content-Type-Options Checks whether the browser supports the X-Content-Type-Options API, which prevents MIME sniffing. Block reflected XSS Checks whether the browser blocks execution of JavaScript code that appears in the request URL. Browser-based XSS filters mitigate some classes of crosssite scripting attacks. Page 32 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome Block location spoofing The global "location" object can be used by JavaScript to determine what page it is executing on. It is used by Flash Player, Google AJAX API, and many bookmarklets. Browsers should block JavaScript rootkits that try to overwrite the location object. Block JSON hijacking Documents encoded in JSON format can be read across domains if the browser supports a mutable Array constructor that is called when array literals are encountered. JSON hijacking is also possible if the browser supports a mutable setter function for the Object prototype that is called when object literals are encountered. Block XSS in CSS Script in stylesheets can be used by attackers to evade server-side XSS filters. Support for CSS expressions has been discontinued in IE8 standards mode and XBL in stylesheets has been restricted to same-origin code in separate files in Firefox. We check to make sure that script injected into a site via stylesheet does not execute. Sandbox attribute Checks whether the browser supports the sandbox attribute, which enables a set of extra restrictions on any content hosted by the iframe. Origin header Checks whether the browser supports the Origin header, which is a mitigation for cross-site request forgery (CSRF) attacks. Strict Transport Security Checks whether the browser supports Strict Transport Security, which enables web sites to declare themselves accessible only via secure connections. Page 33 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome Block cross-origin CSS attacks By injecting CSS selectors into the target site, attackers can steal confidential data across domains using style sheet import, even without JavaScript. Browsers should correctly determine the content type when loading cross-origin CSS resources. Cross Origin Resource Sharing Checks whether the browser supports the APIs for making cross origin requests. Block visited link sniffing Most browsers display visited links with a :visited CSS pseudo class. A user's browsing history can be sniffed by testing the visited links by checking this CSS class. We test whether browsers restrict access to the :visited pseudo class. Content Security Policy Checks whether the browser supports Content Security Policy, which reduces the XSS attack surfaces for websites that wish to opt-in. 2. Rich Text test (18 tests) Selection These tests verify that selection commands are honored correctly. The expected and actual outputs are shown. Apply Format These tests use execCommand to apply formatting to plain text, with styleWithCSS being set to false. The expected and actual outputs are shown. Apply Format, styleWithCSS Page 34 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome These tests use execCommand to apply formatting to plain text, with styleWithCSS being set to true. The expected and actual outputs are shown. Change Format These tests are similar to the unapply tests, except that they're for execCommands which take an argument (fontname, fontsize, etc.). They apply the execCommand to text which already has some formatting, in order to change it. styleWithCSS is being set to false. The expected and actual outputs are shown. Change Format, styleWithCSS These tests are similar to the unapply tests, except that they're for execCommands which take an argument (fontname, fontsize, etc.). They apply the execCommand to text which already has some formatting, in order to change it. styleWithCSS is being set to true. The expected and actual outputs are shown. Unapply Format These tests put different combinations of HTML into a contenteditable iframe, and then run an execCommand to attempt to remove the formatting the HTML applies. For example, there are tests to check if bold styling from <b>, <strong>, and <span style="font-weight:normal"> are all removed by the bold execCommand. It is important that browsers can remove all variations of a style, not just the variation the browser applies on its own, because it's quite possible that a web application could allow editing with multiple browsers, or that users could paste content into the contenteditable region. For these tests, styleWithCSS is set to false. The expected and actual outputs are shown. Unapply Format, styleWithCSS These tests put different combinations of HTML into a contenteditable iframe, Page 35 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome and then run an execCommand to attempt to remove the formatting the HTML applies. For example, there are tests to check if bold styling from <b>, <strong>, and <span style="font-weight:normal"> are all removed by the bold execCommand. It is important that browsers can remove all variations of a style, not just the variation the browser applies on its own, because it's quite possible that a web application could allow editing with multiple browsers, or that users could paste content into the contenteditable region. For these tests, styleWithCSS is set to true. The expected and actual outputs are shown. Delete Content These tests verify that 'delete' commands are executed correctly. Note that 'delete' commands are supposed to have the same result as if the user had hit the 'BackSpace' (NOT 'Delete'!) key. The expected and actual outputs are shown. Forward-Delete Content These tests verify that 'forwarddelete' commands are executed correctly. Note that 'forwarddelete' commands are supposed to have the same result as if the user had hit the 'Delete' key. The expected and actual outputs are shown. Insert Content These tests verify that the various 'insert' and 'create' commands, that create a single HTML element, rather than wrapping existing content, are executed correctly. (Commands that wrap existing HTML are part of the 'apply' and 'applyCSS' categories.) The expected and actual outputs are shown. Selection Results Number of cases within those tests that manipulate HTML (categories 'Apply', 'Change', 'Unapply', 'Delete', 'ForwardDelete', 'Insert') where the result selection matched the expectation. Page 36 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome q.C.Supported Function These tests verify that the 'queryCommandSupported()' function return a correct result given a certain set-up. styleWithCSS is being set to false. The expected and actual results are shown. q.C.Enabled Function These tests verify that the 'queryCommandEnabled()' function return a correct result given a certain set-up. styleWithCSS is being set to false. The expected and actual results are shown. q.C.Indeterm Function These tests verify that the 'queryCommandIndeterm()' function return a correct result given a certain set-up. styleWithCSS is being set to false. The expected and actual results are shown. q.C.State Function These tests verify that the 'queryCommandState()' function return a correct result given a certain set-up. styleWithCSS is being set to false. The expected and actual results are shown. q.C.State Function, styleWithCSS These tests verify that the 'queryCommandState()' function return a correct result given a certain set-up. styleWithCSS is being set to true. The expected and actual results are shown. q.C.Value Function These tests verify that the 'queryCommandValue()' function return a correct result given a certain set-up. styleWithCSS is being set to false. The expected and actual results are shown. q.C.Value Function, styleWithCSS These tests verify that the 'queryCommandValue()' function return a correct Page 37 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome result given a certain set-up. styleWithCSS is being set to true. The expected and actual results are shown. 3. Selectors API test (2 tests) Passes Selectors API tests passed Failed Selectors API tests failed 4. Network test (17 tests) PerfTiming This test determines if the browser has the Web Performance Timing properties available. Check Latency This isn't actually a test. Many of the tests measure how long it takes for a resource to load, but the load time can vary greatly depending on the user's network latency. This page measures the average latency to the UA Profiler server, and then adjusts the timing thresholds throughout the remaining test pages accordingly. If you have high latency (slow network connection), the tests take longer to load. If you have low latency (fast network connection), the tests are run faster. Connections per Hostname Page 38 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome When HTTP/1.1 was introduced with persistent connections enabled by default, the suggestion was that browsers open only two connections per hostname. Pages that had 10 or 20 resources served from a single hostname loaded slowly because the resources were downloaded two-at-a-time. Browsers have been increasing the number of connections opened per hostname, for example, IE went from 2 in IE7 to 6 in IE8. This test measures how many HTTP/1.1 connections are opened for the browser being tested. Max Connections The previous test measures maximum connections for a single hostname. This test measures the maximum number of connections a browser will open total across all hostnames. The upper limit is 60, so if a browser actually supports more than that it'll still show up as 60. || Script Script When some browsers start downloading an external script, they wait until the script is done downloading, parsed, and executed before starting any other downloads. Although parsing and executing scripts in order is important for maintaining code dependencies, it's possible to safely download scripts in parallel with other resources in the page (including other scripts). This test determines if the browser downloads scripts in parallel with other scripts in the page. || Script Stylesheet When some browsers start downloading an external script, they wait until the script is done downloading, parsed, and executed before starting any other downloads. Although parsing and executing scripts in order is important for maintaining code dependencies, it's possible to safely download scripts in parallel with other resources in the page (including other scripts). This test determines if the browser downloads scripts in parallel with other stylesheets in Page 39 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome the page. || Script Image When some browsers start downloading an external script, they wait until the script is done downloading, parsed, and executed before starting any other downloads. Although parsing and executing scripts in order is important for maintaining code dependencies, it's possible to safely download scripts in parallel with other resources in the page (including other scripts). This test determines if the browser downloads scripts in parallel with other images in the page. || Script Iframe When some browsers start downloading an external script, they wait until the script is done downloading, parsed, and executed before starting any other downloads. Although parsing and executing scripts in order is important for maintaining code dependencies, it's possible to safely download scripts in parallel with other resources in the page (including other scripts). This test determines if the browser downloads scripts in parallel with other iframes in the page. Async Scripts HTML5 introduced the async attribute for script tags. This allows page authors to specify that their scripts can safely load in the background, independent of the other scripts in the page. This test determines if the browser supports the async attribute. || CSS Similar to scripts, some browsers block all downloads once they start downloading a stylesheet. This test determines if stylesheets can be downloaded in parallel with other resources in the page. Page 40 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome || CSS + Inline Script A lesser known performance problem is the problems caused when a stylesheet is followed by an inline script block. If a browser doesn't block when downloading stylesheets (as measured by the previous test), then a stylesheet followed by an image could both be downloaded in parallel. But suppose an inline script block was placed between the stylesheet's LINK tag and the image IMG tag. The result, for some browsers, is that the image isn't downloaded until the stylesheet finishes. The reason is that the image download must occur after the inline script block is executed (in case the script block itself inserts images or in some other way manipulates the DOM), and the inline script block doesn't execute until after the stylesheet is downloaded and parsed (in case the inline script block depends on CSS rules in the stylesheet). It's important to preserve the order of the stylesheet rules being applied to the page, followed by executing the inline script block, but there's no reason other resources shouldn't be downloaded in parallel and not applied to the page until after the inline script block is executed. A subtlety of this test is that if the test is determined to be a failure if the inline script is executed before the stylesheet is done downloading - although this is faster it could lead to unexpected behavior. Cache Expires This test determines if a resource with a future expiration date is correctly read from the browser's cache, or issues an unnecessary HTTP request. This is really testing the browser's memory cache. Cache Redirects Many pages use redirects to send users from one page to another, for example http://google.com/ redirects to http://www.google.com/. Unfortunately, most browsers don't pay attention to the cache headers of these redirects, and force the user to endure the redirect over and over again. This test measures if Page 41 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome a redirect for the page is cached when it has a future expiration date. Cache Resource Redirects Whereas the previous test measures redirect caching for the main page, this test measures redirect caching for resources in the page. Link Prefetch This test determines if the prefetch keyword for the link tag works. (See the link prefetch description in this MDC FAQ and in a working draft of the HTML 5 spec.) Prefetch is an easy way for web developers to download resources they know the user will need in the future. data: URLs A "data:" URL (aka an inline image), is a technique for embedding other resources directly into the main HTML document. Doing this avoids an extra HTTP request. This test checks if an image inserted using a "data:" URL is rendered correctly. Headers in trailer This test checks if sending headers in the trailer of a chunked HTTP #response is supported by the browser. 5. Acid3 test (1 test) Score Acid3 test score 6. JSKB test (75 tests) Page 42 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome undef OK Is the global undefined really undefined typeof undefined Inf OK Is the global Infinity set properly Infinity === 1/0 NaN OK Is the global NaN set properly NaN !== NaN window is global Does "window" alias the global scope? !!this.window && this === window Can "use strict" Is EcmaScript5 strict mode supported? !(function () { return this; }.call(null)) Array.slice typeof Array.slice fn.bind typeof Function.prototype.bind getters Are getters/setters supported? (function(){try{return(!!eval("({get x() { return true; }})").x);}catch(e) {return(false);}})() Page 43 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome eval function Does eval differ when used as a function vs. as an operator? See ES5 sec 15.1.2.1.1. (function (undefined) { return (0,eval)("undefined") === 1; })(1) typeof Date.now None CoreFeatures Summary of JS features independent of browser APIs native JSON Is JSON defined natively? typeof JSON typeof Object.prototype.toSource None typeof Object.prototype.toJSON None date.toISOString typeof Date.prototype.toISOString date.toJSON typeof Date.prototype.toJSON JSON.stringify with replacer typeof JSON !== "undefined" && JSON.stringify(false, function (x) { return ! this[x]; }) === "true" typeof uneval None Base64 encode/decode fns Page 44 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome typeof atob Serialization JSON and serialization support standard events typeof addEventListener typeof attachEvent None IE events !!window.attachEvent doc.createEvent typeof document.createEvent createEventObject typeof document.createEventObject createEventObject !!document.createEventObject Events Event APIs available. native getElementsByClassName typeof document.getElementsByClassName native getElementsByClassName typeof document.documentElement.getElementsByClassName document.all Is document.all present? !!document.all extended createElement syntax (function(){try{return(document.createElement('<input type="radio">').type === Page 45 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 'radio');}catch(e){return(false);}})() compareDocumentPosition typeof document.documentElement.compareDocumentPosition Element.contains typeof document.documentElement.contains Element.contains !!document.documentElement.contains doc.createRange typeof document.createRange doScroll typeof document.documentElement.doScroll doScroll !!document.documentElement.doScroll getBoundingClientRect typeof document.documentElement.getBoundingClientRect getBoundingClientRect !!document.documentElement.getBoundingClientRect html.sourceIndex "sourceIndex" in document.documentElement 2 param setAttribute Does setAttribute need only the two parameters? document.body.setAttribute.length === 2 toStaticHTML Does window.toStaticHTML exist? typeof toStaticHTML DOM Page 46 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome DOM APIs style.styleSheet typeof document.createElement('style').styleSheet cssText typeof document.body.style.cssText getComputedStyle typeof getComputedStyle currentStyle typeof document.body.currentStyle currentStyle !!document.body.currentStyle CSS CSS typeof XMLHttpRequest None XMLHttpRequest !!window.XMLHttpRequest ActiveXObject typeof ActiveXObject postMessage typeof postMessage Network Network APIs Function Junk Do functions not leak dangerous info in negative indices? Page 47 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome void 0 === ((function(){})[-2]) function exprs OK Do function expressions not muck with the local scope? void 0 === ((function(){var b,a=function b(){};return b;})()) finally OK Do finally blocks fire even if there's no catch on the stack. (function () { try { throw null; } finally { return true; } })() function scope OK Do function scope frames for named functions not inherit from Object.prototype? http://yura.thinkweb2.com/named-function-expressions/#spidermonkeypeculiarity 0 === (function () { var toString = 0; return (function x() { return toString; })();})() try scope OK Do exceptions scope properly? (function(){var e=true;try{throw false;}catch(e){}return e;})() typeof new RegExp('x') Are RegExps functions or objects? strings indexable 'a'===('a'[0]) unreachable function Are functions declared only if reachable? (function(){var a;if(0)function a(){}return void 0===a;})() __proto__ Page 48 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome Is __proto__ defined for objects? typeof ({}).__proto__ [:Cf:] Are format control characters lexically significant? eval("'\u200d'").length === 1 String.split OK Does string.split work properly -- no skipping blanks? 'a,,a'.split(',').length === 3 Trailing comma Is a trailing comma in an array ignored? [,].length === 1 Length DontEnum Does the length property of an array become enumerable after being set? (function (a) { a.length = 0; for (var _ in a) { return false; } return true; })([0]) arguments instanceof Array Is the arguments object an instanceof Array? (function () { return arguments instanceof Array; })() Buggy arguments concat Safari makes arguments an Array but breaks concat. (function () { return arguments instanceof Array && [].concat(arguments)[0][0] ! == 1; })(1, 2) {} empty Have enumerable keys been added to Object.prototype? Page 49 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome (function () { for (var _ in {}) return false; return true; })() fn.name Do functions have a name property? "name" in function () {} inherited enumerable Are inherited properties inumerable? (function () { function c() {} c.prototype = {p:0}; return (new c).propertyIsEnumerable("p"); })() eval(s,f) Does eval violate integrity of closures? (function (x) {return eval("x",function(x) {return function() { return x * 0; };}(true));} (false)) str.replace(re,fn) Can functions be used to generate RegExp replacements? "-1 2.0".replace(/\S+/g, Math.abs) === "1 2" Are E4X style for-each loops available? (function () { for each (var k in [true]) { return k; } })() Page 50 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome APPENDIX C 1. Security Test Page 51 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 2. Rich Text Test Page 52 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 3. Selectors API Test Page 53 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome Page 54 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 4. Network Test Page 55 MALAYSIAN PUBLIC SECTOR OPEN SOURCE SOFTWARE PROGRAMME Phase III – INTERNET BROWSERS COMPARISON : Internet Explorer VS Mozilla Firefox VS Google Chrome 5. Acid3 Test Page 56