Javascript Stack demonstration task


The communication protocols on the Internet such as HTTP are stateless. State can be maintained

in a number of ways within the client server architecture. One weak technique used by the HTTP

client to maintain state is to keep a record of previously visited Uniform Resource Locators. These

locations are stored by the client and accessed via the backward and forward button of the web



Design a system that models the way the client browser maintains the aforementioned state. The

system must allow the user to enter a new URL into the system and either go back to a URL loaded

previous to the current URL or go forward to a URL loaded after the current URL. The storage

mechanism used by the browser must include two stacks (one backward and one forward) both of

which support the following behaviour:


? Pop item from stack

? Push item onto stack

? Empty a stack

Generally speaking, the backward stack stores items of previously visited URLs and the forward

stack stores items moved from the backward stack to the forward stack.

The system must allow the user to interact in three ways: enter a new URL, recover URLs from the

backward stack; and recover URLs from the forward stack. The actions of the user should produce

the following results:

? Entering URL (via an address bar)

o Push current document onto backward stack

o Empty forward stack

? Recover URL from backward stack

o Push current document onto forward stack

o Pop backward stack

o Load popped URL as current document

? Load URL from forward stack

o Push current document onto back stack

o Pop forward stack

o Load popped URL as current document

? Additional Rules

o The system is initialised with a Home page

o A new Window has empty stacks

o Popping an Empty Stack is non-fatal

NB. The aim of the stack is to only allow access to the item at the top of the stack. In other words,

a stack is a form of sequential access (NB Arrays allows random or non-sequential access)3


Implement a client interface to support the requirements and demonstrate the principles in full. The

best approach to take in order to solve the problem is to use an event based style of programming.

Use appropriate form components to represent the components of the browser and a series of

JavaScript functions to model the behaviour of the browser. The design must simulate the

behaviour of the web client, but not duplicate its performance. Do not, therefore, write code which

calls a web page via a URL and inserts the page into part of the loaded document.

This should be able to support a full URL string and be able to extract the relevant parts and store/display them



This is just a single page not linked to the internet.

It should use the pop behaviour and push function

It should be written entirely in JAVASCRIPT, NOT JQUIERY

The attached file displays an example of how it should look and work.

Kemahiran: CSS, HTML, Javascript

Lihat lebih lanjut: web stack, work home resource, web server javascript, web page design models, ways work home, user interface design principles, two string problem, stateless programming, stack programming, sequential programming, sequential design, push models, programming technique, programming javascript, principles programming, linked stack, introduction web page design, introduction internet programming, solve arrays, top javascript, form style css best, extract number string, event based programming, css style programming code, programming string functions

Tentang Majikan:
( 0 ulasan ) United Kingdom

ID Projek: #4111674

3 pekerja bebas membida secara purata $175 untuk pekerjaan ini


No problem,sir. Pleasure to see this work...i can guarantee quality . Thanks and regard

$500 USD dalam 12 hari
(7 Ulasan)

Hi, Thanks for posting an interesting job. I can complete this task in 2 days. Looking forward to work with you. Thanks! -Tamil Vendhan K

$200 USD dalam 2 hari
(6 Ulasan)

Please check my PM to know why I am the best fit

$225 USD dalam 5 hari
(0 Ulasan)

This seems to be an easy task.

$100 USD dalam 2 hari
(0 Ulasan)