40
Chapter 1
Behind the scenes, something has to connect all these pieces together. That
“something” is the web browser. The browser takes your HTML and CSS, and turns
those angle brackets and semicolons into a page with graphics, buttons, and text.
It’s also the web browser that runs your JavaScript code... behind the scenes, the
browser takes care of important jobs like storing the values of your variables, creating
new types, and handling any network requests that your code might make.
Introducing the web browser
JavaScript
<html>
.
.
.
</html>
HTML
h1, h2 {
fon
col
}
p {
CSS
Web Browser
Web Server
...and turns them into
a visual page that
users can see.
Internet Explorer
Firefox
Opera
Safari
Mozilla
It’s the browser that stores
variable values and gives
your code access to network
requests and responses.
When you type in a URL,
click a button, or enter a
value in a eld, the browser
passes those events on to
a JavaScript function or a
program on the web server.
The browser also handles making
requests to web servers, and guring
out what to do with responses it
gets back from those servers.
The web browser
takes your HTML
and CSS...
<script>
var request...
function foo()
{
...
}
</script>
<?php
require(‘lib.php’);
function go() {
$myVar = ...
return ...
}
?>
introducing the web browser
Here’s what we’ve
been talking
about these last
several pages.