Skills: HTML, CSS, Javascript/jQuery, DOM, AJAX, JSON

Background Information:

A Uniform Resource Locator (URL) is the representation of what is commonly known as a web address: see image.

https://en.wikipedia.org/wiki/URL
https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax
https://www.w3schools.com/html/html_urlencode.asp

Description of Assignment:

The goal of this assignment is to obtain and analyze a set of URLs.

Step 1: Obtain a set of URLs

(The original assignment called for accessing these URLs from the browser history. Due to security concerns, there are restrictions on what can be obtained from the browser history.)

https://developer.mozilla.org/en-US/docs/Web/API/History
https://www.w3schools.com/jsref/obj_history.asp

As an alternative, please provide a File-Upload button so that the user/instructor and choose a file which will contain a list of URLs, and take it from there. Here are two links that should be helpful:

https://www.w3schools.com/jsref/dom_obj_fileupload.asp
https://www.javascripture.com/FileReader

Step 2: Parse the URLs into their component parts (see above for components)

Three approaches are:

  • do your own parsing
  • use regular expressions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
  • convert the string to a URL object https://developer.mozilla.org/en-US/docs/Web/API/URL

Step 3: Lookup the domain names and obtain their corresponding IP addresses:

One way to get the IP address is

  • pass a domain name to this site: https://dns.google.com/resolve?name=
  • use an XMLHttpRequest() to send a request to the Google DNS server
  • use JSON.parse(*) to parse the response

Step 4: List each complete URL as it appeared in the browser history, as well as all their respective component parts, including the corresponding IP address

Use either < table> or < div> tags and create appropriate headers for each columns

Step 5: Display summary data below the table

For example: how many of each scheme, how many of each top-level domain (TLD), etc.

Use bar graphs or pie charts to present your analysis
https://www.w3schools.com/howto/howto_google_charts.asp
https://canvasjs.com/html5-javascript-pie-chart/
https://www.anychart.com/blog/2017/12/06/pie-chart-create-javascript/

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.