Texting With JS Playfully P5 Learning Machine

Serving Pages from Server

Server Side Exercises

Webpages are in the Interwebs

This page has been served from a remote server. The user i.e you care, feel and want to experience is a smooth operation of the web page. This is page has a purpose. It is to act as a memory hook, a reminder about conceptual difference between server-side and user-side javascript.

What is one Major Difference

The webpage that is shown to the user need not contain any JavaScript. Webpage that we build on a file like index.html is not required.. The entire page is built on the server and it is transported to the web browser of the user.

Your location shown

How about this page?

It is a static page with inbuilt script sent to the browser. Browser is seeing it, as whole page. The Geolocate button above shows the location after getting your permission.

What difference does it make?

To the regular consumer of websites, it opens up aesthetically pleasing pages, with functions that is supported from the server. Especially the security is enhanced, as the user credentials are stored in the server. Multiple front-end frameworks are created for the developers to build websites fast. For example, provide any of the english "Parts of Speech" in the below text box. This queries the server that the page is hosted and provides the data.

The color associated is:

Hey, I am unable to scrape this Page!!!

Scraping is the activity of selectively pulling the information of the webpage, and storing it for later use. Scraper is not a browser. Page only comes in if a browser requests for it. The page is rendered like a movie on the theatre screen. If there is no screen, then how to see and then scrape it?

How to send input to Server?

On Page Input The page can be rendered with elements from which the user input can be requested, and then processed on the server-side. The output can be sent back to the page. On URL input The url that is entered into the address bar is modified to include the input from the user. Many API's work using the url modification process. Querying these APIs can be done through requests libraries in Python on Javascript.

Why learn server side programming?

Knowledge about sending the pages piece-wise to the browser opens up new technologies and frameworks which were not available when the page had to be sent as a full file. The libraries like Express, Svelte, React and Angular are the mutation of the server-side scripting. It is a mandatory launchpad to lift off into the Front-End world.

How the Page style works?

That is, the server sends the stylesheet to the user. This page is styled with Tachyons CSS. If you check the source of the page, the style sheet itself has come along from the server.