Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

If the following web page was currently in our browser and we presented the high

ID: 674199 • Letter: I

Question

If the following web page was currently in our browser and we presented the highlighted text “Second Page”, what HTTP command would be sent to the server:

1.) <h1>The First page </h1>

<p>

If you like, you can switch to the

<a href=http://www.dr-chuck.com/page2.htm>

Second page </a>

</p>

a.)GET

b.)PUT

c.)RETR

d.)POST

e.)LOCALHOST

2.) For the following text stored in a file on a server with a suffix of “.php”

<h1> Hello One </h1>

<p>

<?php

      echo (“Hello two ”)

</p>

<p>

<script>

document.write(“Hello three”);

</script>

</p>

3.) Which of the line of code is /are executed on the server

a.) Hello One

b.) Hello Two

c.) Hello three

d.) All above

e.) none above

4.) Which of the lines of code affect the DOM(Document Object Model) in the browser after everything has executed?

Same choices as 3

5.) Which if the following is a bad red flag when you forget your password in terms of a website handling/storing your password in a proper manner?

a.) They send you a uRL to reset your password

b.) You must enter a code sent to your phone via text to rest your password

c.) The send your old password to you via email

d.) you must answer three security questions before you can reset your password

Explanation / Answer

1)   ANSWER:- a) GET

Because we are getting the page2 by using the hyperlink from the HTTP server.

NOTE:- POST : It comes into an argument when we are going to post or upload anything into the server. Usually, POST is mandatory when the request can modify the data in the server

PUT : In HTML there are only two methods that is GET and POST and they are also knows as HTTP request methods. So there is no chance of PUT in HTML.

LOCAL HOST: This command will be sent only when we are using our own internal server for example TOMCAT SERVER

2 & 3) ANSWER:- b) HELLO TWO

  

The order is like this:

Browser - send request
Server - execute PHP script
Server - send output to browser
Browser - read output and execute JavaScript

4) ANSWER:- c) HELLO THREE

    EXPLANATION: Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document. JAVASCRIPT will be used to dynamically update the pages in the HTML So, JAVASCRIPT will be executed by the DOM.

5) ANSWER:- b) YOU MUST ENTER A CODE SENT TO YOUR PHONE VIA TEXT TO RESET YOUR PASSWORD.

   It is the best method to change your password because a code will be sent into your registered mobile number.