You are on page 1of 62

TECHNICAL UNIVERSITY OF SOFIA

COMPUTER SCIENCE FACULTY

DIPLOMA THESIS

DESIGN AND DEVELOPMENT OF WEB BROWSER

STUDENT SUPERVISOR
SALIH COSKUNTUNA Ass.Prof.PhD Румен Иванов Трифонов

F.NO: 273212014
SOFIA 2016

1
Content

s
Chapter 1: INTRODUCTION OF WEB BROWSERS............................................................................3
HISTORY OF WEB BROWSERS..........................................................................................................4
FIRST STEP INTO THE WORLD OF BROWSERS.............................................................................9
INTERNET EXPLORER......................................................................................................................10
GOOGLE CHROME.............................................................................................................................13
MOZILLA FIREFOX............................................................................................................................14
SAFARI.................................................................................................................................................16
OPERA..................................................................................................................................................18
Chapter 2: MY BROWSER...................................................................................................................19
SECTIONS OF MY EXPERIENCE......................................................................................................20
PROPERTIES WITHIN A STANDARD BROWSER..........................................................................21
DISTINCTIVE FEATURES FROM EACH OTHER OF WEB BROWSERS......................................22
NEW ADVANTAGES OR DISADVANTAGE OF WEB BROWSERS..............................................23
SOME OF WEB BROWSER ARCHITECTURES...............................................................................24
SOFTWARE IMPLEMENTATION OF THE PROPOSED BROWSER USING ECL. AND JAVA...31
FEATURES OF JAVA LANGUAGE...................................................................................................32
Chapter 3: TESTS OF WEB BROWSERS............................................................................................33
GOOGLE CHROME.............................................................................................................................34
INTERNET EXPLORER......................................................................................................................35
MOZILLA FIREFOX............................................................................................................................36
MY BROWSER....................................................................................................................................37
YANDEX BROWSER..........................................................................................................................38
TOR BROWSER...................................................................................................................................40
COMPARISON OF THE BROWSER..................................................................................................41
Chapter 4: CONCLUSIONS..................................................................................................................52
LIST OF ABBREVIATIONS................................................................................................................54
WEB BROWSER SOURCE CODES....................................................................................................55
LIST OF FIGURES AND TABLES......................................................................................................60
REFERENCES......................................................................................................................................62

2
Chapter 1: INTRODUCTION OF WEB BROWSERS

Nowadays, we are using frequently web browsers. These are our


access ticket for the internet world.
In time, web browsers became an obligation in our life and at certain
times new web browsers are arising. If we do a simple definition of
browser;
It is a software that is used to entry the internet and we are visiting
web pages via web browsers. The Major browsers are Google
Chrome, Opera, Safari, Firefox, Internet Explorer and new browser
Spartan by Microsoft Company and other web browsers. Web browser
are working on the operating systems. Different browsers, platforms,
operating systems are completing the internet world. Today we are
using different kind of famous web browsers. Standard Browsers are
generally surfing on the internet so visiting the web sites. Also these
sites have to run image, video, text and other functions on the
browser. Problems can be crash problems, codec problems, support
problems, controlling problems and we can say connection problems.
The aim have to be good interface, performance, run different
platform, a good user experience and other possibilities. This
possibility changes demands by human. Sometimes browsers may be
forced to run some web players (or media players), plugins, cookies,
extensions, and permissions. As a result will crash web sites but it
means of support doesn’t mean that everything will be much better
browser. New properties comes according with demands and
requests. Shortly, the range is very wide. Browser may use in each
sector and this feature is very useful browser makes and we are
connecting to the digital world via our desktop or portable devices. If
we look from function side is primary purpose of a web browser is to
bring information resources to the user, allowing them to view the
information and then access other information. This process
begins when the user inputs a Uniform Resource Locator (URL)
into the browser. The prefix of the URL, the Uniform Resource

3
Identifier or URI, determines how the URL will be interpreted. The
most commonly used kind of URI starts with http: and identifies a
resource to be retrieved over the Hypertext Transfer Protocol (HTTP).
Many browsers also support a variety of other prefixes, such
as https: for HTTPS, ftp: for the File Transfer Protocol,
and file: for local files. As we said most browsers can display
multimedia files and also it supports XML files, CSS, flash applications
and java applets. When a link is clicked, the browser navigates to the
resource indicated by the link's target URI, and the process of bringing
content to the user begins again. Here, we will examine history of web
browser, how browsers are working, structures, architectures,
engines, functions, experimental tests, analysis and results on the
platforms.

HISTORY OF WEB BROWSERS

First web browser was invented in 1990 by Tim Berners-Lee. First


browser called WorldWideWeb but later, it changed to Nexus so
renamed. Also first available web browser from Erwise interface used
for gui (graphical user interface).This browser worked on UNIX based
system and platform was gnu operating system. In 1993, another
innovated browser is created by Marc Andreessen(Mosaic)and led to
an explosion in web use. Andreessen, the leader of the Mosaic team
at National Center for Supercomputing Applications(NCSA), soon
started his own company, named Netscape, and released the Mosaic
influenced Netscape Navigator in 1994, which quickly became the
world's most popular browser, accounting for 90% of all web use at its
peak.
The Netscape browser led in user share until Microsoft Internet
Explorer took the lead in 1999 due to its distribution advantage. A free
open source software version of Netscape was then developed called
Mozilla, which was the internal name for the old Netscape browser,
and released in 2002. Mozilla has since gained in market share,

4
particularly on non-Windows platforms, largely due to its open source
foundation, and in 2004 was released in the quickly popular Firefox
version.

A chronological listing of some of the influential early web browsers


that advanced the state of the art is provided below:

 WorldWideWeb: Tim Berners-Lee wrote the first web browser on


a NeXT computer, called WorldWideWeb, finishing the first
version on Christmas day, 1990. He released the program to a
number of people at CERN in March, 1991, introducing the web
to the high energy physics community, and beginning its spread.

 Libwww: Berners-Lee and a student at CERN named Jean-


Francois Groff ported the WorldWideWeb application from the
NeXT environment to the more common C language in 1991 and
1992, calling the new browser libwww. Groff later started the first
web design company, InfoDesign.ch.

 Line-mode: Nicola Pellow, a math student interning at CERN,


wrote a line-mode web browser that would work on any device,
even a teletype. In 1991, Nicola and the team ported the browser
to a range of computers, from UNIX to Microsoft DOS, so that
anyone could access the web, at that point consisting primarily of
the CERN phone book.

 Erwise: After a visit from Robert Cailliau, a group of students at


Helsinki University of Technology joined together to write a web
browser as a master's project. Since the acronym for their
department was called "OTH", they called the browser "erwise",
as a joke on the word "otherwise". The final version was
released in April, 1992, and included several advanced features,
but wasn't developed further after the students graduated and
went on to other jobs.

 ViolaWWW: Pei Wei, a student at the University of California at


Berkeley, released the second browser for UNIX, called
ViolaWWW, in May, 1992. This browser was built on the
5
powerful interpretive language called Viola that Wei had
developed for UNIX computers. ViolaWWW had a range of
advanced features, including the ability to display graphics and
download applets.

 Midas: During the summer of 1992, Tony Johnson at SLAC


developed a third browser for UNIX systems, called Midas, to
help distribute information to colleagues about his physics
research.

 Samba: Robert Cailliau started development of the first web


browser for the Macintosh, called Samba. Development was
picked up by Nicola Pellow, and the browser was functional by
the end of 1992.

 Mosaic: Marc Andreessen and Eric Bina from


the NCSA released the first version of Mosaic for X-Windows on
UNIX computers in February, 1993. A version for the Macintosh
was developed by Aleks Totic and released a few months later,
making Mosaic the first browser with cross-platform support.
Mosaic introduced support for sound, video clips, forms support,
bookmarks, and history files, and quickly became the most
popular non-commercial web browser. In August, 1994, NCSA
assigned commercial rights to Mosaic to Spyglass, Inc., which
subsequently licensed the technology to several other
companies, including Microsoft for use in Internet Explorer. The
NCSA stopped developing Mosaic in January 1997.

 Arena: In 1993, Dave Raggett at Hewlett-Packard in Bristol,


England, developed a browser called Arena, with powerful
features for positioning tables and graphics.

 Lynx: The University of Kansas had written a hypertext browser


independently of the web, called Lynx, used to distribute campus
information. A student named Lou Montulli added
an Internet interface to the program, and released the web
browser Lynx 2.0 in March, 1993. Lynx quickly became the
preferred web browser for character mode terminals without
6
graphics, and remains in use today. Resources include
theBrowser.org Lynx page, the ISC Lynx page, and the Lynx
User Guide.

 Cello: Tom Bruce, cofounder of the Legal Information Institute,


realized that most lawyers used Microsoft PC's, and so he
developed a web browser for that platform called Cello, finished
in the summer of 1993.

 Opera: In 1994, the Opera browser was developed by a team of


researchers at a telecommunication company called Telenor in
Oslo, Norway. The following year, two members of the team Jon
Stephenson von Tetzchner and Geir Ivarsøy left Telenor to
establish Opera Software to develop the browser commercially.
Opera 2.1 was first made available on the Internet in the summer
of 1996.

 Internet in a box: In January, 1994, O'Reilly and associates


announced a product called Internet In a Box which collected all
of the software needed to access the web together, so that you
only had to install one application, instead of downloading and
installing several programs. While not a unique browser in its
own right, this product was a breakthrough because it distributed
other browsers and made the web a lot more accessible to the
home user.

 Navipress: In February, 1994, Navisoft released a browser for


the PC and Macintosh called Navipress. This was the first
browser since Berners-Lee's WorldWideWeb browser that
incorporated an editor, so that you could browse and edit content
at the same time. Navipress later became AOLPress, and is still
available in some download locations on the Internet but has not
been maintained since 1997.

 Mozilla: In October, 1994, Netscape released the the first beta


version of their browser, Mozilla 0.96b, over the Internet. On
December 15, the final version was released, Mozilla 1.0,
making it the first commercial web browser. An open source
7
version of the Netscape browser was released in 2002 was also
named Mozilla in tribute to this early version, and then released
as the quickly popular Firefox in November, 2004.

 Internet Explorer: On August 23rd, 1995, Microsoft released their


Windows 95 operating system, including a Web browser called
Internet Explorer. By the fall of 1996, Explorer had a third of
market share, and passed Netscape to became the leading web
browser in 1999. (Internet Explorer will be deprecated
in Windows 10, with Microsoft Edge replacing it as the default
web browser.)

Then initiating the industry's first browser war. Bundled with Windows,


Internet Explorer gained dominance in the web browser market;
Internet Explorer usage share peaked at over 95% by 2002.
Opera debuted in 1996; it has never achieved widespread use, having
less than 2% browser usage share as of February 2012 according to
Net Applications. Its Opera-mini version has an additive share, in April
2011 amounting to 1.1% of overall browser use, but focused on the
fast-growing mobile phone web browser market, being preinstalled on
over 40 million phones. Apple's Safari had its first beta release in
January 2003; as of April 2011, it had a dominant share of Apple-
based web browsing, accounting for just over 7% of the entire browser
market. The most recent major entrant to the browser market
is Chrome, first released in September 2008. Chrome's take-up has
increased significantly year by year, by doubling its usage share from
8% to 16% by August 2011. This increase seems largely to be at the
expense of Internet Explorer, whose share has tended to decrease
from month to month. In December 2011, Chrome overtook Internet
Explorer 8 as the most widely used web browser but still had lower
usage than all versions of Internet Explorer combined. Chrome's User
base continued to grow and in May 2012, Chrome's usage passed the

8
usage of all versions of Internet Explorer combined. By April 2014,
Chrome's usage had hit 45%.

Figure 1

FIRST STEP INTO THE WORLD OF BROWSERS

Today we have a lot of options for user aspect. Why, The Persons
preferring some browsers? What is significant for people?
Web is like a sea and browser is a ship too. We can surf everywhere
via web browser in deep web or normal web.
Deep web browsers are private browsers and we can say another
world. Our online information is protected and if we can’t find on the
search engine, we use these private and secure connections. We can
buy special drugs, counterfeit currency, forged papers, firearms,
ammunition and explosives, hitmen, human organs and other internet
crime works. So usually, this kind of browsers are using illegal
operations. It is not useful for normal users. Other part concerns us so
normal web area.

9
Now Let us famous browsers research in all respects in
detailed (Performance, Secure, Visual and other possible
events).Also including my new browser information too.

INTERNET EXPLORER

Figure 2

The First browser of Microsoft Company. Anciently, Internet Explorer


was very bad, slow and awful. Because, it comes with the operating
system (Windows Platform) and we were used for another browsers
for download. I guess, first use is very important because it stays in
people’s minds so including psychological state. Now Microsoft
couldn’t change people’s minds (not everyone) and passed to the
project Spartan. Every Browser may include open gates but through to
the support unit and company avoided the problems. Generally, It had
security, visual and performance problems. If we come programming
section; as it is known Microsoft, using own language and these
languages C, C++, c#, .net…Also, this platform is not free and only it

10
works only windows desktop systems. It can run X64, IA-32, ARMv7,
IA-64, SPARC platforms.
Closed Source O.S =Microsoft Windows, Mac OS X, Chrome OS.
Open Source O.S (Linux) =Ubuntu, NetBsd, Pardus….
In Time, Internet Explorer is arrived updated and developed. I.E was
developed in C++ language and it works only windows operating
systems. It has 95 different languages and including HTML5, CSS3,
WOFF, SVG, RSS, Atom, JPEG XR standards.it was created Trident
and Chakra Engines. I.E is available Windows, Mac OS X, Solaris OS,
HP-UX. Internet Explorer is integrated new areas at the same time
(Xbox360, Xbox).Explorer directly does not work other operating
systems for this, we need utilities for provide. Trident engine also
known as MSHTML and Microsoft used this dll every version of I.E.
desktop and mobile environment. First version and CSS supports in
CSS 2 rendering, next version came corrected issues with CSS
handling, then corrected the box model and added quirks mode with
DTD switching, add partial PNG alpha support, IEMobile 6 combines
many properties, SVG XHTML, HTML5, CSS3, ES5,add new
hardware-accelerated Jscript engine named Chakra and Support for
Web GL and SPDY. These features are included in Windows desktop
environment, after in mobile phone 8.1(Windows).
Some other Trident-based applications include:
 Google Talk (which uses Trident to render chat windows and
profile cards)
 IE Tab, Firefox, Google Chrome (add-on used to render pages
with Trident within the Firefox or Chrome user interface.)
 Maxthon (while adding features not built into IE7)
 Lunascape
 Microsoft InfoPath
 Outlook (for render HTML Messages)
 Visual Studio(render the Web Browser control)
 Messenger
11
 Netscape Browser
 Skype (software for VoIP that renders HTML data with Trident)
 Windows Media Player(Render the Media Information Pages)
 Valve’s Steam (to render the “store”, “Update News”, and
“Community” sections as well as the Steam in-game browser
and MOTD screens in Valve games. The steam client was
updated to use WebKit instead of Trident for these features.)
 360 Secure Browser (A web Browser in China).

Internet Explorer is one of the most preferred browser but every


browser may have problems. Companies are periodically updating
and fixing problems. Normally internet explorer is not working on
linux based systems.

12
GOOGLE CHROME

Figure 3

Chrome is developed by Google and name is coming from


graphical user interface. In Linux, This browser is called chromium
and it has open source. It developed for Microsoft Windows beta
version at 2008 and I has 43 different languages and after we see
Mac OS X and Linux versions are developed. Chromium design
based on BSD License and Chromium has open source but this
because of license, it could not be open source. Made in research,
Chrome browser is the most preferably in the world. This Browser
is running on Android 4.0 and later, Ios 4.3 and later, Linux, OS X
and Windows XP SP3 and Later versions. Chrome is using Webkit
engine and V8 JavaScript engine. Also programming parts are
occurring C++, JavaScript, Python and Assembly languages. It
supports X86, X64, 32-Bit, ARM platforms. WebKit Engine is very
useful for developers. Hence; Apple, KDE, Nokia, Google,

13
Samsung and other companies are using this engine. It is created
in C++ language. This engine is presented under the BSD-style
license. Javascript is a dynamic programming language and
commonly used as part of web browsers. A lot of different kind of
applications can run on the browser via javascript elements
(including Jquery).
MOZILLA FIREFOX

Figure 4

Mozilla Firefox as known shortly Firefox is free and it has open-


source a web browser. Now Firefox developed for Linux, OS X,
Windows and Android for mobile version. It supports 79 different
languages and as programming language comes C++, Javascript,
C, CSS, XUL, XBL. Firefox quicken Gecko engine and
SpiderMonkey software. Gecko engine (layout engine) is developed
by Mozilla Foundation and Mozilla Corporation. Gecko engine is
free, open-source software and used C++ language. Also it can use
cross platforms (Linux, Windows, Mac OS X…). As Support, CSS
(Level 2.1, partial 3), DOM (Level 1, 2, partial 3), HTML4 (partial
HTML5), Javascript (1.8.5) –Implemented in SpiderMonkey,

14
MathML, RDF, XForms, XHTML 1.0 , XML 1.0 , XSLT , XPath and
SVG 1.1(Standard Support).About SpiderMonkey, It is the first-ever
JavaScript engine, open source ,It Provides Javascript support for
Mozilla Firefox and various embeddings such as the GNOME 3
desktop. GNOME is a desktop environment which is composed
entirely and for this, C++, Vala, Python and Javasript languages are
used. GNOME is part of the GNU Project. Vala language is
basically OOP language with self-hosting compiler that generates C
code and uses GObject system. It can carry C and C# trace’s.
SpiderMonkey software is including C and C++ languages and It
supports IA-32, X86, X64, ARM, MIPS and SPARC platforms.
Monkey is dividing to two internals for optimization part and
contains an interpreter, the IonMonkey JIT compiler, and a garbage
collector. (IonMonkey and OdinMonkey).IonMonkey which aims to
enable many new optimizations that were impossible with the prior
JägerMonkey architecture. OdinMonkey is the name of Mozilla's
new optimization module for asm.js, an easily compilable subset of
JavaScript. OdinMonkey itself is not a JIT compiler, it uses the
current JIT compiler. It's included with Firefox from release version
22. As some of application areas, Mozilla Firefox, Thunderbird,
SeaMonkey, Acrobat Reader, Dreamweaver, Yahoo! Widgets, SAP
HANA Application Services, some playing games, emulators and
GNOME desktop environment version 3 and later.
Firefox has approximately %16 of worldwide usage as a “desktop”
browser and the third most popular web browser.

15
SAFARI

Figure 5

Safari is developed by Apple Company and included with OS X and


IOS (OS).First released native browser of IOS is also called Safari
but it has a different GUI and uses Webkit version and application
programming interface (API). Later Safari came to the Microsoft
OS on June 11(2007).Still, we are using today and last version
available for windows. Safari is written in C++ and Objective – C
but in the future, they will use swift language. This language mixed
C and Objective C languages. I guess optimization and
performance will be increases. It uses Webkit and JavaScript core
(Nitro). Nitro core is originally derived from KDE’s JavaScript
engine (KJS) library and PCRE regular expression library. Through
to them JavaScript Core has been improved with many new
properties and greatly improved performance. Safari is not prefer in
windows media and in time, new features is updated came from old
versions to new versions. Safari is working pretty good in MAC OS
X. Safari 8 was announced at 2014 and released with OS X
Yosemite.

16
SPARTAN

Figure 6

Microsoft Egde is developed under the codename Project Spartan is


integrated with Windows 10. It released on March 30, 2015 (Public
view).It will replace Internet Explorer as the default browser on
Windows 10 PC’s and smartphones and tablets. Microsoft will use
new engine in Spartan Browser’s. Already Microsoft couldn’t solve
some problems in trident engine. Now with EdgeHTML engine,
Microsoft wants to raise own reputation. This engine is written in C++
language and with Web GL API is providing to perform much better
than Chrome and Firefox but it just possibility and stable version is not
published yet. Spartan has an assistant within browser and it contains
a lot of languages. Egde doesn’t support legacy technologies such as
ActiveX and Browser Helper Objects and will instead use an extension
system. We will discuss details more in tests.

17
OPERA

Figure 7

Opera browser is developed by Opera Software. Browser may run


on OS X, Linux operating systems and Microsoft Windows. Opera
uses Blink engine, V8 JavaScript engine and Presto (For speed
mode).Also Opera is written in C++ and first initial release year is
1995. Browser covers 42 different languages. Presto engine is
working on the cross-platforms and it has dynamic engine but only
presto is not enough for engine part so Opera is using two layout
engine and one JavaScript engine. Blink engine is coming from part
of the Chromium project by Google and also some major firms are
supported (Intel, Samsung etc.).Opera for mobile phones and
tablets which have the Android OS and It uses blink engine. On
portable devices, especially opera is running pretty good and one
step ahead of the other browsers.

Yandex, Vivaldi, Torch, Tor, Comodo Dragon, Baidu Spark, Slimjet,


UC Browser, Avant Browser, Netscape Navigator, Hover, Dolphin,
Puffin, Waterfox and 360 Browser etc. are other possibilities.

18
Chapter 2: MY BROWSER

Figure 8

This basic My Browser is created by mine. It may run on all


supported java platforms and systems. Browser is working via
webkit engine and JavaScript engine. It created in java language
and JavaFX 8.0 used on eclipse software. Also JavaFx has SDK
and Javafx is more compatible with Webkit engine from others. This
engine is using generally by best browsers. JavaFX is a set of
graphics and media packages that enables developers to design,
create, test, debug and deploy rich client applications that operate
consistently across diverse platforms. Browser has some functions;
homepage, menu bar and other functions.

In 1994, first mobile browser is generated “PocketWeb”.Mobile


browsers are created for tablets and smart phones (portable
devices).Mobile Browsers are optimized as to display web content
most effectively for small screens on portable devices. Mobile
browsers are using low memory capacity, low bandwidth and with
new technologies together modern browsers are generated via
CSS, JavaScript and Ajax. We have to remember that here;
Operating Systems are very important for Web Browsers. Because
19
they are running on the operating systems. Browser and operating
systems must be compatible. If OS is not good, browsers will badly
affected
and performance may be degrease, crashing problems and other
layout problems. Browsers are running generally X86, X64 Bits
platforms. With the development of hardware, we are testing X64
Bits applications and programs on operating systems. I would like
to say a little about my experience of the web browsers.

SECTIONS OF MY EXPERIENCE

The browser can have lot of features but we can’t analysis from this
situation good or bad and occurs web browser deficits.
I.E: Windows is indispensable in the platform and contributions are
great because stable in desktop. Also mobile side, I.E is spending
low energy on the portable devices (Laptops, Phones, Tablets).But
It may not play all web players on the website. For Windows, a
unique browser actually. Internet Explorer doesn’t have high
hardware component for good performance on Windows.
Google Chrome: It can supports all different kind of things but
spending much ram capacity (min %10 more)
Some players can be heavy, for example; when we use flash player
for watching video on the website, browser forced to run flash
player actions. But we have to give the right about performance.
Chrome is the best, If we look from the performance window. Last
version of Chrome, webcam permission is not running Windows 7
professional version. But compatible with other versions.
Operating system affects the performance of browser. Safari
browser is the best browser on OS X platform. Battery life,
performance and compatibility are positive actions.

20
PROPERTIES WITHIN A STANDARD BROWSER

Generally, the browsers are including some functional features. File


parts (tab settings, tools for website and other functions).Edit Part is
the most useful optional commands (cut, copy, paste and other
options).View part is including visual settings (toolbars and explorer
bars, zoom, text, style and other functions).Favorites is personal
part for user. We may connect own personal stored websites. Tools
section is to host extreme for user. Private browsing, tracking
protection, active x and smart screen filtering, pop up settings,
browser options, developer tools and other functions. Help is
already known for user. It covers browser information and helping
to user (online of offline mode). (Ex: I.E)
Internet Explorer

Figure 9

21
DISTINCTIVE FEATURES FROM EACH OTHER OF WEB BROWSERS
These features are according to user requests. It maybe occurs by
user’s demands and wishes. This kind little things are impressing
user. Some touch on; Google Chrome has cloud system, pretty
good themes, convenient extensions and applications on the web
store (Also Firefox and Internet Explorer have a store too). Also
Chrome has user login system via Google account and it supports
with cookies. Cookies are usually text files (generally small
files).When we visit to the website, cookies can remember our data
in second or later times (id and password).When we join the
website, the site may ask to us about language and later, what if we
choose this screen comes. Browser are storing the cookie files in
own structure. Periodically, we can delete these files via web
browser. Why we delete these files, because web sites can be
upgrade or some little changes cause crash problems, servers or
other hazards. Cookies are dividing to Session and Persistent
Cookies. Companies are developed some toolbars for web browser
searches. Through, info can be found from shortest way or quickly.
The famous toolbars are Google, Bing, Yahoo, Yandex, Ask and
Alexa Toolbar some of these, But this toolbar can tighten on the
browser.

Figure 10

22
NEW ADVANTAGES OR DISADVANTAGE OF WEB BROWSERS

We will research and discuss performance tests for Google Chrome


browser. In Internet Explorer, Microsoft Office Tools are integrated
on the browser. It has duplicate tab feature, subscribe this feed, fix
connection problem functions. Mozilla Firefox benefits e-mail
function via thunderbird program. It can work offline and It has set
up sync to devices and save pockets actions. Famous browser are
added one more actions. This is for foreign users and it named
language translator. Google and Microsoft pioneered in this area.
Also text speeches are developed in artificial intelligence. Safari
browser has spelling and grammar check feature and reading list
(like notepad). Yandex Browser is saying to you something for
example; If connection speed is changed, compressing videos for
turbo mode. Another properties are Lightshot for save image, Turn
of the lights for videos or movies, Evernote web clipper for save
your info, connections to the evernote.com, LastPass for
passwords, credit card numbers, personal data. Also Yandex is
connecting own services on the browser (Mail, Weather, Traffic,
Radio broadcast, cloud services are running on the browser).
Microsoft Spartan is including Cortana and It is personal assistance
in Spartan which makes our web browser easier and helps we do
thing in a much easier way. On the website, Spartan allows you to
take notes, write on the website. Also Spartan has reading view for
books integrated. Not all Web browsers fully support somethings.
Nowadays security is significant for users for safety. HTTP is not
enough for secure area. Now we are using HTTPS and “S” is
coming from SSL (HTTP + SSL = HTTPS).But still browsers don’t
support this protocol. When pop-up blocker is enabled, if we
choose the Open as PDF button on a report request page, then the
report will not open because it will be blocked(in Chrome and
Mozilla).
The preview button doesn’t appear on the request pages of reports
(Chrome, Firefox, Safari).When we watch some video or movie and

23
another animations, flash player was running but it was staying
heavy and sometime was crashing. Now Youtube, They began new
method source to use via HTML5. Still, some websites couldn’t
pass to HTML5 and SSL.

SOME OF WEB BROWSER ARCHITECTURES


I.E has high level architecture, information on the reuse of its
components and a summary of some of the powerful methods of
extensibility available to developers. It has Com-Based Architecture
(Component Object Model), which governs the interaction of all of
its components and enables component again and extensibility.
I.E’s major components;

Figure 11

- iexplore.exe: It is at the top level and is the I.E executable. It is a


small application that relies on the other main components of I.E to do
the work of rendering, navigation, protocol, implementation.

24
- BrowseUI.dll: It is responsible for rendering the browser UI (User
Interface) such as menus and toolbars.
- ShDocVw.dll: It provides the navigation, local caching and history
functionalities for the browser.
- MSHTML.dll: It is at the heart of I.E and takes care of its HTML
and CSS parsing and rendering functionality. This dll is sometimes
referred to by its code name, ”Trident” and it exposes interfaces
that enable you to host it as an active document. Word, Excel, Visio
and many non-Microsoft applications also expose active document
interfaces so they can be hosted by shdocvw.dll. It also exposes a
set of API’s (Application Programming Interface) for runtime
inspection and modification of the DOM tree. The DOM tree is
further processed by a layout engine which then renders the
internal representation on screen.
- URLMon.dll: It offers functionality for MIME handling and code
download. And provides a thread-safe wrapper around WinInet.dll
and other protocol implementations.
- WinInet.dll: It is the protocol handler for HTTP, HTTPS and FTP. It
handles all network communication over these protocols. These
protocols along with cache management.

25
Figure 12

-Web Core: It is a layout, rendering, and Document Object


Model (DOM) library for HTML and SVG. The WebKit framework
wraps WebCore and JavaScript Core, providing an Objective-
C application programming interface to the C++ based WebCore
rendering engine and JavaScript Core script engine, allowing it to be
easily referenced by applications based on the Cocoa API; later
versions also include a cross-platform C++ platform abstraction, and
various ports provide additional APIs.
WebKit passes the Acid2 and Acid3 tests, with pixel-perfect rendering
and no timing or smoothness issues on reference hardware.

-V8 JavaScript Engine: JavaScript Core is a framework that


provides a JavaScript engine for WebKit implementations, and
provides this type of scripting in other contexts within OS. JavaScript
Core is originally derived from KDE's JavaScript engine
(KJS) library (which is part of the KDE project) and the PCRE regular
expression library. Since forking from KJS and PCRE, JavaScript
Core has been improved with many new features and greatly
improved performance.

26
Almost, all browsers have 32-bit and 64 bit CPU architecture supports
on the OS.

Figure 13

Safari, Chrome, Yandex, Opera and some other browsers are using
webkit engines. 32-Bits sometimes be limited but 64 bits have wide
zone.

Mozilla Firefox Architecture

27
Table 1

●Single master Gecko process (usually running the “main UI”)


●One or more slave “content” processes
●Processes communicate using “IPDL”
●IPDL specifies IPC interfaces (like IDL)
●Auto-generates IPC messaging code
●IPDL can also be used to pass messages across threads

Table 2

Gecko Main Flow Webkit Main Flow

28
Table 3

DOM TREE

Table 4

The browser main functionality is to present the web resource you


choose, by requesting it from server and displaying it on the browser
window. The resource format is usually HTML but also PDF, image
and more. The location of the resource is specified by user using URI
(Uniform Resource Identifier).Among the common user interface
elements are:
1. Address bar for inserting the URI
2. Back and forward buttons
3. Bookmarking options
29
4. Refresh and stop buttons for refreshing and stopping the loading
of current documents
5. Home button for our homepage.
The job of the HTML parser is to parse the HTML markup into a
parse tree.HTML definition is in a DTD format and coming from
SGML family. The format contains definitions for all allowed
elements their attributes and hierarchy. HTML DTD doesn’t form a
context free grammar. DTD has a few variations;
The Strict mode conforms solely to the specifications but other
modes contain support for markup used by browsers in past. The
purpose is backwards compatibility with older content.
DOM (The output tree): The parse tree is a tree of DOM element
and attribute nodes. It is object presentation of the HTML document
and the interface of HTML elements to the outside world like
JavaScript.
The Parsing Algorithm Reasons
 The forgiving nature of the language
 The fact that browsers have traditional error tolerance to
support well known cases of invalid HTML.
The parsing process in universal. Usually the source doesn’t change
during parsing but in HTML, script tags containing ”document.write”
can add extra tokens, so the parsing process actually modifies the
input. It divides two stages – tokenization and tree construction
Tokenization is the lexical analysis, parsing the input into tokens.
Among HTML tokens are start tags, end tags, attribute names and
attribute values. The tokenizer recognizes the token, gives it to the
tree constructor and consumes the next character for recognizing the
next token and so on until the end of the input.

30
Figure 14

Webkit uses Flex and Bison parser generators to create parser


automatically from the CSS grammar files. As we recall from the
parser introduction, Bison creates a bottom up shift reduce parser.
Firefox uses a top down parser written manually. In both cases each
CSS file is parsed into a StyleSheet object, each object contains CSS
rules. The CSS rule objects contain selector and declaration objects
and other object corresponding to CSS grammar. Also my program is
using webkit engine and of course it supports webkit’s features.
SOFTWARE IMPLEMENTATION OF THE PROPOSED BROWSER USING
ECL. AND JAVA
My web browser is java based and created with java FX.
As we created this code (My Browser code - Page 52), first it can work
every platform. We created this code in Java language and it is
running on the eclipse software. Eclipse components are Java 8 and
Java Development Kit (JDK) and Software Development Kit (SDK).
JDK is an implementation of either one of the Java SE,EE or ME
platforms released by Oracle in the form of binary product aimed
java developers on Solaris, Linux, Mac OS X or Windows .It includes
a private JVM and few other resources to finish recipe to a Java
Application. SDK allows the creation of applications for a certain

31
software packing, software framework, hardware platform and
another development platform.
FEATURES OF JAVA LANGUAGE

My favorite feature is same response. Because as it is known when


we create a code in C++, C# and other languages, response can’t be
same. Program may not work smoothly. Other known features are
simple, secured, portable, dynamic, high performance, object-
oriented, platform independent, robust, architecture neutral,
interpreted, multithreaded and distributed. Also we can work on the
eclipse for different languages but stone is heavy in place. In short, if
we talk about the program;
with last version of java together, java is further enhanced. Via
javafx, gui is developed in java technology. We are importing javafx,
java and javax libraries into the program. Also we are supporting with
engine, frames, buttons, panels, text fields and labels and applying
actions to the bar. Thus, we create function for own website and
using. When we click arrow button then URL text will run to the
website from text field. JavaFX is an API and set of graphics and
media packages that enables developers to design, create, test,
debug and deploy rich client applications that operate consistently
across diverse platforms. But we have to install sdk for javafx
platforms on the software program (eclipse).Java Fx is including
some features these are:
 Java API: Java library that consists of classes and
interfaces in java code. Designed friendly alternative to
Java Virtual Machine (JVM) languages, such as JRuby and
Scala.
 FXML and Scene Builder: Interactively design the graphical
user interface (GUI).
 WebView: WebkitHTML technology to make it possible to
embed web pages within a JavaFX application. Some
features are added in Java FX 8.

32
And other features; swing, built controls and CSS, Modern
theme, 3D graphics features, Canvas API(for scene
consists graphical element),printing API, rich text support,
multi touch support, hi-DPI support(for hi-dpi
displays),hardware performance media engine(low latency
media framework) and self contained application
deployment model.
Chapter 3: TESTS OF WEB BROWSERS
Here, we research different kind of tests on web browsers. Browser
ability to render and modify the HTML elements in web pages, DOM
update speed and mathematical methods, webGL in HTML5 allows
3D graphics within the browser, ability to display a poster image on
the HTML5 video player, ability to play HTML5 videos encoded with
H.264/MPEG-4 AVC codec, theora codec and WebM codec. Via web
workers, allow the browsers to work on multiple tasks simultaneously.
We are testing two images or four images at the same time. 2D
games support, with canvas test evaluate browser ability to create
dynamic, scriptable rendering of 2D objects and some effects, array
functions.
DOM is the standard API JavaScript uses dynamic webpages, text
manipulations, boot times, use of ram and another tests. We
compared famous browser on windows platform and obtained some
data on the Internet. We analyzed different kind of hardwares on the
same platforms. We will research webkit, gecko, trident, blink, presto
and V8 JavaScript engines, HTML5 Capabilities and points.
We will test first on desktop platform. We may test on the some
websites. Via http://peacekeeper.futuremark.com website is providing
to test our browser. This website is analyzing and applying some
functions automatically.
These tests are; rendering (ex: square elements, animates), HTML5
WebGL (ex: simple transpared 3D cube) and video (ex: Codes and
other video support tools), web worker (JavaScript multiple actions),
game(2D sprite based), canvas(drawing and manipulating graphics),

33
data(add remove stored in array), DOM operations and text parsing.
So, we obtain the following tables and web browser features from
tables. Other test is on the html5test.com. Also this site is testing our
browser performance and it gives points for browser support features.

GOOGLE CHROME

34
Chrome supports all HTML5 capabilities and codecs. OPS and FPS values
are good and DOM speed score is useful. General Score is better than
other browsers on windows 7 platform. Also Canvas FPS has normal value.
(Chrome Version 39 - Webkit Engine)

INTERNET EXPLORER

Table 5

Internet Explorer doesn’t support some codecs (Theora, WebM).


WebglSphere fps is better than Chrome but DOM operation values are
degreasing here and another values too. But gaming Spitfire tests are
including approximate values. Internet Explorer render test results are

35
better than Chrome. Generally Chrome’s scores higher than Internet
Explorer.
(Internet Explorer Version 11-Trident Engine)

MOZILLA FIREFOX

Table 6

Firefox’s render values are low according to them and doesn’t support
some codecs (H264, Theora). HTML5 capabilities values are nearly
36
but Canvas value is better than Chrome and I.E. Data Part is
approximate to the Internet Explorer. DOM operation values and text
parsing parts are better than the others. (Firefox 38- Gecko Engine)
MY BROWSER

Table 7

My Browser’s render values are low according to them, my browser


doesn’t support some codecs (WebM, Theora), some contrast settings

37
and webglSphere doesn’t useful. Only canvas point can pass to the
Internet Explorer and other values have low points.
(My Browser Version 1.1 - WebKit Engine)
YANDEX BROWSER

Table 8

38
Yandex suite render point is better than the other browsers. Browser
is supporting all codecs and other settings. Text parsing value is
between chrome and Firefox. Canvas point is better than internet
explorer but it couldn’t pass Chrome and Firefox.
(Yandex Browser Version 15.2 – Webkit Engine)

39
TOR BROWSER

Table 9

Generally, the values are normal and it doesn’t support some codecs
(H264,Theora) and doesn’t support webglSphere. Other values are
normal or below.
(Tor Browser Version 5.02-Gecko Engine)
40
COMPARISON OF THE BROWSER

41
Table 10

42
I.E and Edge don’t supports some codecs (WebM, Theora). Chrome is the best for
functionality angle. High points are good, low points are bad values for feature support.

Table 11

43
Table 12

44
Table 13

45
Table 14

46
Table 15

47
Table 16

Figure 15

48
Figure 16

Figure 17

49
Figure 18

50
Figure 19

Figure 20
Figure 21

Figure 22 Figure 23

Figure 24

51
It was tested Haswell based Intel i7 5960x, 16 GB DDR4 RAM, Samsung 850 Pro SSD. But In
my own tests, my computer has low power from device part. Intel i5 M450, 6 GB DDR3 RAM,
640 GB 5400 RPM HD, ATI HD 5400 Graphics Card.

Figure 25

Chapter 4: CONCLUSIONS

We researched HTML5 Capabilities and JavaScript performance.


The Google Chrome is the best in point of support and performance.
But If we have low hardware, we might have problems. Chrome is
using RAM much more according to other (especially mobile and
laptop platforms).Mobile devices have low hardware so chrome may
not useful choice. Opera, Uc browsers be a good choice (other
browsers). As it known, desktop hardware is better than laptops, so
performance can be different. What is the best browser? The answer
is simple, it depends of user and if we use low hardware Internet
Explorer, Mozilla or Yandex can be a good choice. Some users when
on first use, they may not examine and says: I didn’t like this browser.
Also in other side they ask: Which browser do you use? (For example
Chrome). Later, I will use chrome too. Why? Other user is using this
browser. As we said about I.E. My Browser doesn’t support video

52
Codecs (Theora, WebM) and webgl, some work contrast settings. But
for JavaScript part, we can’t say same thing. Also Safari, I.E and
Mozilla don’t support these video

codecs too. As we said before, platforms are important for


performance ex: Safari is not good on Windows platform but this
situation is changing on Mac computers. Mac performance is better
than windows, also I.E is the best only on Windows. In mobile, Opera
and Chrome more useful according to others but mobile devise are
not enough for hardware angle. Also desktop hardware and mobile
hardware can’t be equal. We have several browser alternatives and
this completely belong to us. Generally, the browsers are written in C
languages and java platform can’t be a good choice. Also as we
tested, Webkit engine is providing best performance within all engines.

The Browsers are updating and coming with new features. But
nevertheless, browsers don’t provide human’s requirements
performance, security, visualization, activity management and other
properties together. Some browsers are better from performance
angle, some browsers are better from safety and visual. Hence Apple,
Microsoft, Google, Mozilla are developing a new super browser jointly.
WebAssembly's (WASM) under the roof generated. This super team,
which aims to use the high programming language for desktop and
mobile browser. As it known, JavaScript is running on the browsers
but they want to change this idea. Because the say “old head” for
JavaScript. These companies want to remove JavaScript from
browsers. They are working on the .NET based “bytecode” coding
system. The aim is more safety, speed to the desktop and mobile
platforms. If they do this, browsers will run 20x more fast.

53
LIST OF ABBREVIATIONS

SSL: Secure Socket Layer


XML: Extensible Markup Language
CSS: Cascading Style Sheets
CERN: European Organization for Nuclear Research
UNIX: Uniplexed Information and Computer Systems
SLAC: Stanford Linear Accelerator Center
WOFF: Web Open Font Format
SVG: Scalable Vector Graphics
RSS: Rich Site Summary
JPEG XR: Joint Photographic Experts Group Extended Range
I.E: Internet Explorer
DTD: Document Type Declaration
SPDY: Speedy (Network Protocol)
KDE: K Desktop Environment
XBL: Extensible Bindings Language
XUL: XML User Interface Language
DOM: Document Object Model
MIPS: Million Instructions Per Second
API: Application Programming Interface
JIT Compiler: Just In-Time Compiler
PCRE: Perl Compatible Regular Expression
JMV: Java Virtual Machine
IPDL: Industrial Property Digital Library
IPC: Internet Proxy Cache
MIME: Multipurpose Internet Mail Extensions

54
WEB BROWSER SOURCE CODES

import javafx.application.Platform;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.embed.swing.JFXPanel;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebEvent;
import javafx.scene.web.WebView;

import javax.swing.*;
import javax.swing.text.DefaultEditorKit;

import java.awt.*;
import java.awt.event.*;
import java.net.MalformedURLException;
import java.net.URL;

public class Browser {

private JFXPanel jfxPanel = new JFXPanel();


private WebEngine searchEngine;
private JFrame frame = new JFrame("Welcome to My Browser...");
private JPanel panel = new JPanel(new BorderLayout());
private JLabel labelStatus = new JLabel();
private JButton buttonGo = new JButton("GO");
private JButton buttonReload = new JButton("RELOAD");
private JTextField urlField = new JTextField();
private JMenuItem saveButton = new JMenuItem("SAVE");
private JMenuItem openButton = new JMenuItem("OPEN");

public Browser(){

saveButton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent arg0){
JFileChooser saveFile = new JFileChooser();
saveFile.showSaveDialog(null);
System.out.println ("OPENED!!");
}
});

openButton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent arg0){
JFileChooser saveFile = new JFileChooser();
saveFile.showSaveDialog(null);
System.out.println ("SAVED!!");
}
});

55
frame.add(saveButton);
panel.add(saveButton);
frame.add(openButton);
panel.add(openButton);

createInitialize();
}

private void createInitialize(){


createScene();
ActionListener al = new ActionListener() { // add actionlistener
@Override
public void actionPerformed(ActionEvent e) {
loadURL(urlField.getText());
}
};

buttonGo.addActionListener(al);
urlField.addActionListener(al);
JPanel topBar = new JPanel(new BorderLayout(5, 0));// add Jpanel named “ topBar” and layout
topBar.setBorder(BorderFactory.createEmptyBorder(3, 5, 3, 5));
topBar.add(buttonReload,BorderLayout.WEST);
topBar.add(urlField, BorderLayout.CENTER);
topBar.add(buttonGo, BorderLayout.EAST);// reload, go buttons and textfield are adding to the top
bar panel
JPanel statusBar = new JPanel(new BorderLayout(5, 0));
// added panel and layout
statusBar.setBorder(BorderFactory.createEmptyBorder(3, 5, 3, 5));
statusBar.add(labelStatus, BorderLayout.CENTER);
//set border setting and label are adding to the status bar
panel.add(topBar, BorderLayout.NORTH);
panel.add(jfxPanel, BorderLayout.CENTER);
panel.add(statusBar, BorderLayout.SOUTH);
//top bar, jfx panel and status bar are adding to the panel.

JMenuBar menubar = new JMenuBar();


JMenu filemenu = new JMenu("File");
filemenu.setMnemonic(KeyEvent.VK_F);
filemenu.add(new JSeparator());
JMenu editmenu = new JMenu("Edit");
// creating menubar, menu and giving shortcut key with seperator
editmenu.setMnemonic(KeyEvent.VK_E);

Action cutAction = new DefaultEditorKit.CutAction();


cutAction.putValue(Action.NAME, "Cut");
editmenu.add(cutAction);
cutAction.putValue(Action.ACCELERATOR_KEY,KeyStroke.getKeyStroke(KeyEvent.VK_X,
KeyEvent.CTRL_DOWN_MASK));
// for action; giving name, shortcut under the mask and adding to the edit menu.

Action copyAction = new DefaultEditorKit.CopyAction();

copyAction.putValue(Action.NAME, "Copy");
editmenu.add(copyAction);

56
copyAction.putValue(Action.ACCELERATOR_KEY,KeyStroke.getKeyStroke(KeyEvent.VK_C,
KeyEvent.CTRL_DOWN_MASK));
// for action; giving name, shortcut under the mask and adding to the edit menu.

Action pasteAction = new DefaultEditorKit.PasteAction();


pasteAction.putValue(Action.NAME, "Paste");
editmenu.add(pasteAction);
pasteAction.putValue(Action.ACCELERATOR_KEY,KeyStroke.getKeyStroke(KeyEvent.VK_V,
KeyEvent.CTRL_DOWN_MASK));
// for action; giving name, shortcut under the mask and adding to the edit menu.

Action selectall = new DefaultEditorKit.CopyAction();


selectall.putValue(Action.NAME, "Select All");
selectall.putValue(Action.ACCELERATOR_KEY,KeyStroke.getKeyStroke(KeyEvent.VK_A,
KeyEvent.CTRL_DOWN_MASK));

editmenu.add(new JSeparator());
// for action; giving name, shortcut under the mask and adding to the edit menu.

JMenuItem newbutton = new JMenuItem("New");


JMenuItem saveas = new JMenuItem("Save As");
JMenu view = new JMenu("View");
view.setMnemonic(KeyEvent.VK_V);
// menu items, menu and shortcut key
Action stop = new DefaultEditorKit.PasteAction();
stop.putValue(Action.NAME, "Stop");
view.add(stop);
stop.putValue(Action.ACCELERATOR_KEY,KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,
KeyEvent.CTRL_DOWN_MASK));
// for action; giving name, shortcut under the mask and adding to the view menu.
Action refresh = new DefaultEditorKit.PasteAction();
refresh.putValue(Action.NAME, "Refresh");
view.add(refresh);
refresh.putValue(Action.ACCELERATOR_KEY,KeyStroke.getKeyStroke(KeyEvent.VK_F5,
KeyEvent.CTRL_DOWN_MASK));
// for action; giving name, shortcut under the mask and adding to the edit menu.
JMenu help = new JMenu("Help");
help.setMnemonic(KeyEvent.VK_H);

JMenuItem fileItem2 = new JMenuItem("About My Browser");


// created fileitem2 named” About My Browser” and adding action to show message.

fileItem2.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(fileItem2, "This Browser is created for Salih's diploma thesis -
2016", null, 1);

}});

JMenuItem closebutton = new JMenuItem("Close");


// created JmenuItem closebutton named” About My Browser” and adding action to exit

closebutton.addActionListener(new ActionListener(){

57
@Override
public void actionPerformed(ActionEvent e) {
System.exit(0);
}});

buttonReload.addActionListener(new ActionListener(){
// adding action to reload button and show message.
@Override
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(buttonReload, "Please Press F5 ", null, 1);

}
});

filemenu.add(newbutton);
filemenu.add(openButton);
saveButton.add(new JSeparator());
filemenu.add(saveButton);
filemenu.add(saveas);
closebutton.add(new JSeparator());
// new,open,save, save as, close buttons are adding to the filemenu
filemenu.add(closebutton);
filemenu.addSeparator();
//file menu separator
help.add(fileItem2);
// help menusune fileItem2 adding
menubar.add(filemenu);
menubar.add(editmenu);
menubar.add(view);
menubar.add(help);
//file , edit, view, help menus are adding to the menubar
frame.setJMenuBar(menubar); // frame set to Menubar
frame.getContentPane().add(panel); // content pane getting or adding panel.
frame.setPreferredSize(new Dimension(800, 600)); // size of frame window (dimension)
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // exit button is closing to the
program
frame.pack();
// reposition the window components
}

private void createScene(){


Platform.runLater(new Runnable(){
@Override
public void run(){
//browser run with engine
WebView view = new WebView();
searchEngine = view.getEngine();
searchEngine.titleProperty().addListener(new ChangeListener<String>(){
@Override
public void changed(ObservableValue<? extends String> observable, String oldValue, String
newValue){
SwingUtilities.invokeLater(new Runnable(){
@Override
public void run(){
Browser.this.frame.setTitle(newValue);//my browser title getting new value.
}

58
});
}
});

//status changed to the another


searchEngine.setOnStatusChanged(new EventHandler<WebEvent<String>>(){
@Override
public void handle( WebEvent<String> event){
SwingUtilities.invokeLater(new Runnable(){
@Override
public void run() {
labelStatus.setText(event.getData()); // label is getting data
}
});
}
});

// adding listener to the engine location


searchEngine.locationProperty().addListener(new ChangeListener<String>(){
@Override
public void changed(ObservableValue<? extends String> ov, String oldValue, String newValue){
SwingUtilities.invokeLater(new Runnable(){
@Override
public void run(){
urlField.setText(newValue);
}
});
}
});

searchEngine.getLoadWorker().exceptionProperty().addListener(new
ChangeListener<Throwable>(){
public void changed(ObservableValue<? extends Throwable> o, Throwable old, Throwable value){
if (searchEngine.getLoadWorker().getState() != null){
SwingUtilities.invokeLater(new Runnable(){
@Override
public void run(){
JOptionPane.showMessageDialog(panel, (value != null) ? searchEngine.getLocation() + "\n" +
value.getMessage() : searchEngine.getLocation() + "\nUnexpectedError","Error! Check Your
Address",JOptionPane.ERROR_MESSAGE);
// if it is wrong entry giving error message
}
});
}
}
});

jfxPanel.setScene(new Scene(view)); // scene setting for JFX Panel


}
});
}

public void loadURL(String url){


Platform.runLater(new Runnable() {
@Override
public void run() {

59
String tmp = toURL(url);
if (tmp == null) {
tmp = toURL("http://" + url); // http comes automatically and url now empty value
}
searchEngine.load(tmp);// engine loading
}
});
}

private static String toURL(String str) {


try {
return new URL(str).toExternalForm();
} catch (MalformedURLException exception) { // valid expception
return null;
}
}

public static void main(String[] args) {


try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());//User interface
manager is getting class name
} catch (Exception e) { }
SwingUtilities.invokeLater(new Runnable() {
public void run() {
Browser browser = new Browser();
browser.frame.setVisible(true);
//visible setting is true for frame
//default page
browser.loadURL("http://www.google.com");
}
});
}

60
LIST OF FIGURES AND TABLES

Figure 1: First Web Browser (WorldWideWeb ) 9


Figure 2: Internet Explorer Screenshot 10
Figure 3: Google Chrome Screenshot 12
Figure 4: Mozilla Firefox Screenshot 13
Figure 5: Safari Screenshot 15
Figure 6: Spartan Screenshot 16
Figure 7: Opera Screenshot 17
Figure 8: My Browser Screenshot 18
Figure 9: Internet Explorer Menu bar and Menus 20
Figure 10: Integrated Toolbars 21
Figure 11: Internet Explorer Architecture 23
Figure 12: Webkit Architecture 24
Figure 13: Mac, Chromium and other Webkit Levels 25
Figure 14: CSS and JavaScript Logic 29
Figure 15: Overview of Desktop Platform 45
Figure 16: Timeline(Desktop) 46
Figure 17: Overview of Mobile Platform 46
Figure 18: Timeline(Mobile) 47
Figure 19: Web XPRT and Sun Spider Results 47
Figure 20: Memory Usage Comparison (Blank) 48
Figure 21: Memory Usage Comparison(Five Tabs) 48
Figure 22: Boot Time Comparison (Start) 48
Figure 23: Boot Time Comparison(Already run) 48
Figure 24: Comparison of Five Web Browsers 48
Figure 25: Most Useful Browser by Country as of February 2015 49
Table 1 : Mozilla Firefox Architecture 26
Table 2 : Gecko Engine Components 26
Table 3 : Gecko and WebKit Main Flows 27
Table 4 : Dom Tree 27
Table 5 : Google Chrome Test Results 32
Table 6 : Internet Explorer Test Results 33
Table 7 : Mozilla Firefox Test Results 34
Table 8 : My Browser Test Results 35
Table 9 : Yandex Test Results 36
Table 10 : Tor Browser Test Results 37
Table 11,12,13,14,15,16,17: Five Known Browser HTML5 Tests 39-44
Diagram 1: Comparison of the Browser Scores 38
Diagram 2: Comparison of Suit Rendering and HTML5 Canvas Points 38

61
REFERENCES
Websites

Peacekeeper.futuremark.com
Html5test.com
Html5rocks.com
Thenextweb.com
Itfeed.com
Blog.en.updown.com
Taligarsiel.com/Projects
Wikipedia.org
Pcmag.com
Kr.droidget.com
Webkit.org/perf/sunspider
Anandtech.com
Msdn.microsoft.com
People.mozilla.org

Books

Java 7 SE

-THE END-

62

You might also like