Name : Pureurara Shasvasd-ava
Sem: st?
Rodd No + O§3%6CS1910hK4
Que’ 1) What st HTTP 2 Exptaie st5 vdisid-y ard various methods
vsed by HTTP 7
fos 1) The hypeatexrd Turanspex Protocol HTTP) i+ Aesigoed fo
enable Communications befween eluents af AeaverS.
HTTP works at a wmeques¢—wmesporse profocod ref-ween a chient- ad
Aearver
Exampte: A ctient (bmowhen) Sends an HTTP wequesé fo the Sever)
theo the Sever wefusrs a wetporte fro fhe chiens. The wetponse
cortaivs Afatus srfoumat-io aboud- fhe wequetd ard may also contaia
Hie wequested content.
The HTTP verbs comprise a major portion of oun “unifoun
anbenfpace” constraint a0 provide us the action comterpaat fo He
oun—baseA wetousce, The primary ox moAd—commonty—uted HTTP verbs
lox methods, ak fhey axe puofeaty called) axe POST, CET, PUT,
PATCH, 20h DELETE. Tete commettord fo create, vead, update, arf
Besete lox CQUD) ocferatiors, mespectavedy, There axe a umber of
ottewx verbs, foo, put ane ud itized se44 frequently, OF #hote fe4s—
foequend med-hod4, OPT TONS a0 HEAD ane uted mone of ter thar
ob hens.
The POST verb a4 mosf—of ter vfstized fo Peseate new
wesounces, Te particular, f'4 uted to cyeate Avrardicate
wetousces, That i4, Ausoxdinate fo some of-hex (e.g. parent) wetource
Tr othe words, wher cxtating a new wesovace, POST to the pasent
ard fhe Aewvice fakes Cane of abfociating fhe new wetouace with fhe
parent, a5Aigring at TD (new wetousce UT), ete.The HTTP GET method 14 used to Knead ®* (on unefoieve) a
atpaeserfation of a wetounce. Te the Shabby”? low ror—ewnwor) path,
GET wetuns a wmepretertatace an XML on ISON and an HTTP
wesporse code of 200 (OK), To a eawon cate, af most of feo wefuarr
a ¥Ok (NOT FOUND) om hoo (BAD 2EOLEST).
PUT iA mostoop tee vbidited fou **tupdate** cababititses, PUT 103
#0 a kroun wetource URT with the wequet¢ body coof-aining fhe rewsy—
updated wepretertation of #he omigunad wmeource,
DELETE ib pred ty eaty fo undlerttard, TH it uted fo Pbetete** o
wetounce identified by a UT.
@ves 3) Discuss Tava Acoipt Awnay so detal .
Aes %) Te TavaScusht, annoy it a single variable fhaf it uted fo
Aton Aspfertod elements. TH ih offen vted whee ux wart fo Afone
Litt of efement-® ah access fhem by a AingJe variable. Unstake most
fanguage-+ where axray iA a weference fo the multiple variable, in
TavaSenipt annay 14 a 4lngle variadle that Afoues mult ipse
edement-4,
Dectaration of an Aywray
Theme axe basically two ways fo Aecdaxe a? arxay.
Example:
vax House = [ ]: HW method t
vax House = new anxayl); method &
But gerenatly method 1 it preferred over the method a2. Left us
vobewAfand fhe weator for fhid.Ae assay 10 TavaScamapt car hold Aiffenert esements
We can Stone Numbers, Stinings ard Bookear io a ingle axay.
E* ample:
fatten none
bright e445 Me
H Sdowmiog umber, boolean, Af aang’ so a? Aawnay
vax house = ["1B4", 25-000, "2B", C0000, "Ret", ¢ ave];
Rcce sing Aawray Elemeog A
Armay ao SavaSeuipt ane indlered from O Ao wt Cat acce’’ array
esements ak fodJow-s:
fatten nore
brightness M
vax house = ["1B44"" 2000, "GH" 0000,
ated thou-se [o]r" Codd = "house [J \
var cost 1D = house [+]:
ow nent = house [=] :
"ent", F ove];
Vax ib
aterH "Cord of 1B = "b cost 104K);
agent("TA house fou veot = "}t s+ for vent);
Length propeaty of ar Away
Leagth Property of a? Anay aefuan’ Fre Leayth of ar Annay. Leagth of
a0 Amamay iS atways one mone thar the higheA# sede of a? Anxay.
Example sesow iitusturater the length probtaty of a0 Aunay:
fodt ew none
bright ress Wvar house = ["1o4", asooo, "24", S000, "Rent", tove];
Uden conataso’ the hength of the arxay
var Ler = hove tens th,
for (vax 6 = 05 a < dens ath)
aletlhouse [a ]);
Dues W) Exptaio so Defaid Dom everd- hanBetting .
Rios WM) HTML DOM event allow TavaSeipt fo vegisten differed
event harAsews on elements an an HTML document,
Ever£4 axe roxmalty used in combiration with functions, and the
purction will nof- ve erecufed before Fhe event occur (4uch a4 when a
Vex Chicks a pvt fon),
The DOM of moder web browsers such aS TES, NSbt, and Fae for
poovide expanded methods and foersbility (metatave fo ofbewr browAer4)
for capturing events, To thir tutorial, we explore event hand Ling aa
the DOM, and the Bit fering support fox at ao TES and NSGH Fine for,
Ore of the Keys to creating Dynamic web pager ad the use of event
hardens, These allow you fo execute Ahecafic Acuipt code so
vesporse fo vse on system initiated actionsMos¢ events oelate
to the browse GUT, such od mouse movement, wut-ton om key Chicks.
and upbates +o foum spuds. These axe v4uatty #ied fo a specific
page element, Of hers welate fo browser actions Auch ab when a
Bocument om image complete’ Joabing Some object have Beftavdt actions
Befpired for ceatain events, Auch ab hacking 09 a hypeaterf Sam, The
browser! 4 cowmad action io Hat event a4 to toad the UAL abtociaped
with the bank,
To any cate, alt events follow the some mobet, The DOM provides
methods for Captuning event4 4o you can Perfoom your own acfaon’
wesponse to them, Tt alto provider an Event ob, ect which contains
information Apecipic to a given event that can se used bY Your event
procersing code,
anQuer 6) What axe the wer Seavers 7 Explain thein features,
Pod 6) The fem web Senver car vefer to hardware ox Software, or
both of them woaking together.
On the hardware Side, a web Server iS a compufer that Afoue’ web
exer software anh a wertite! 4 component fides. (for example, HTML
Aocument-4, images, CSS sfyleshees4, ard TavaSewipt fides) A wer
ever comects to the Toteaned and supports physical data
aofearchange with other Aevaces comected to the wes,
On the Aoftwane Arde, a web Seaver anctudes several parts that
control how web users access hosted files AL a minimum, this i4 af
HTTP serve, Ao HTTP server i4 software that urbexs+ands
UALS [wed adAneste-s) and HTTP [the protocok your browsen vset fo
vaew webpages). Ao HTTP server can be accessed through he oman
fares of the wersifer af Atones, and if Detivers the content of
Frese hosted werstiter to the end user's device,
AL He most batic fevet, wherever a browser oceds a file that st
ho5#eD of a web Atinven, Hhe browser aequesé-s the file via HTTP,
Whee fhe wequer¢ weaches fhe coumect (hardware) wer serves, the
(Bof-twane) HTTP Aewver accepts the vequest, finds fhe vequested
Document, anh Aenb’ sf back fo the browser, alto through HTTP. (TH
the Server Boeto' £ find fhe vequerted Document, if vetvwrs a WOW
weAsponse insd-ead.)
Most web Servers have featuxe+ that altow you to Bo the following:
Create one om more wersiter, (No T Bon’ + mean wild a Sef of wer
Pages. what “T mean is, sed up the website sn fhe wer server, to that
the westite can be wewed via HTTP)Configure fog pile Sef-fing-s, soc studing where fhe Jog files axe -Aaved,
what data +0 inctude oo the fog fides etc. (Log file’ can be used to
analyse traffic e+e)
Conpagure wertite/Ainectony security, For ewample, which usex
accowf-S anelareo' f allowed fo view the webkife, which TP addresses
aaclaren' $ allourd fo view fie wessite etc,
Cueate ao FTP site. An ETP site allows usens to transfer filer
to ar from the Aide.
Create vindual Aivectories, ard map them fo pryical Aivectories
Conpigurcinomarad-e custom eaux pages, This allows you to buitd ab
Asbpday vsex fried dy error meAtage’ of your website. Fox example,
you can Specify which page 4 Aispsayed when a vtew Fuses fo access a
page that doeso’ f exist (ie. a WOK eaunowr).
Specapy Aefault Aocuments. Default Aocument& ane those that axe
Asbplayed wher oo file rome s& specified. For example, af you open
bee pM hocashost, which fide should ve Ai+playeA] This a4 fypicatly
nberhtml ox Aimisax wt st Boeso' # veed +o ve. You covsd romioate
nderetm if Your webbite i using Coldfusion, You could also tominate
a wd choice (in case there ib ro snhexctm fide), and a Bab choice, ad
4o on,
Due’ 2) Yow frame’ a Layers axe used so HTML 7 Explain with
Example .
Ans 2 ) HTML frames ane used to divide your browser window into
multiple Sections where each Section can doad a separate HTML
Bocument. A coddection of frames in the browser window i+ known a4 a
foareset. The window ib Aswided sofo frames if a Aimidax way He
Farle’ axe organized: soto wows and columos.
Creating Frames
To vse frames on a page we vse Cframeted-> tag instead of Kboby>
fag. The faz Bepines, how to Bivide the winbow soto
forares, The wows af tasbute of Cfoameted+ > tay defines howstoofal
foares ad cold af taste Befines vertical faame+. Each furame ibsbscated by taz anh af Aefpares which HTML Bocument shalt
open soto the fame,
Example
CHiF IES T ML Frame 4 fitle>
head >
Kfoaretet+ sows = "r00pp0gpf>
frame rane = "Lop" tare = "Uhtmbtop faanehtm" [>
Sforame came = "aio" sae = "Mt milmaie pramehtm™ I>
Kfoame rare =
KbodyDYour browser Aces nod Support frames CIroAy>
vot tom! swe = “"Ihdmilbot tom forme hte" I>
Carareset >
htmi>
The HTML faz i+ used fo position and animate (#hexough
Acwipting) elements so a page. A ayer can ve thought of a4 a Separate
Bocument- that wesides on fop of #he main one, abl enitting wit-hio one.
window,
Example
Thit example creates Lhree overlapping Layer
<1 DOC TYPE beme>
Sht-m>
Chit LET ML Layer agit se>
head >
Khayex sd
Woop"
200)
= “Mayes” top = "aro" sept = "0" widdh =
”
heaght = "B00" bgcolor = "wed"'>
Cprbayer 1Up>
"faye" top ="3r0" sept = "40" width = "200!
Kdayex id =
feaght = "200" sycodon = "vive''>
Ktayerr sf = Layers” top = "uso" sept = "aro" width =
filgesalt
height = "200" bgcoton = "gucen">
Cprbayer BUP>
SLayer>
ht-mh>