Section 1

Preview this deck

Is it possible to read cookies placed with JS using PHP?

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (46)

Section 1

(46 cards)

Is it possible to read cookies placed with JS using PHP?

Front

Yes

Back

What is SPA?

Front

A single‐page application (SPA) is a website that re‐renders its content in response to user actions without reloading the entire page

Back

Name the storage available for the duration of the page session (until browser is closed)

Front

Window.sessionStorage

Back

How to convert JSON‐formatted text into Javascript object?

Front

JSON.parse()

Back

How to generate a random decimal number between 0 and 1?

Front

Math.random();

Back

How To delete a stored item?

Front

.removeItem(key)

Back

Is Web Storage API an extension of the window object?

Front

Yes

Back

Name JS engines

Front

• V8 - Google's open source high‐performance JavaScript and WebAssembly engine ◦ Chrome, Node.js • SpiderMonkey - Mozilla's JavaScript engine ◦ Firefox • Chakra - JScript engine by Microsoft ◦ IE and Edge • Tamarin - ActionScript and ECMAScript engine in Adobe Flash

Back

How will be cookies retrieved using document.cookie stored?

Front

as a string, where cookies are separated by a semicolon

Back

How are cookies deleted in JS?

Front

Cookies are deleted by unsetting the cookie value and setting the expire time into past

Back

What happens to indexes When an item is removed with removeItem?

Front

Recalculated

Back

Name persistent storage (until user clears)

Front

Window.localStorage

Back

How to check if the storage is allowed?

Front

if(typeof(localStorage)!=="undefined"){ allowed}

Back

What does json_encode(value) do?

Front

returns a string containing the JSON representation of the supplied value

Back

How are items indexed?

Front

Items set into storage with setItem() have an index number based on the order they were stored

Back

What is the index of the first item?

Front

key(0)

Back

How to set the item?

Front

.setItem(key, value)

Back

What is the MIME type of JASON text?

Front

application/json

Back

Is session storage size fixed?

Front

No

Back

What are the frameworks for SPA?

Front

AngularJS, Vue, React, Aurelia, ...

Back

What data type is key and value?

Front

Strings

Back

What values are allowed in JSON?

Front

string, number, object (JSON object), array, boolean, or null

Back

Is which order is JS code executed?

Front

from top to bottom

Back

What is JavaScript (JS) x2?

Front

a lightweight interpreted or JIT‐compiled (Just In Time) programming language

Back

What executes JS?

Front

JS is executed by the browser's JavaScript engine

Back

Are JS and JScript compatible with ECMAScript?

Front

Yes

Back

How to store all cookies into variable x?

Front

var x = document.cookie;

Back

How To remove all storage?

Front

.clear();

Back

Does client return cookies with every request?

Front

Yes

Back

When does Execution occur?

Front

after HTML and CSS have been assembled and put together into a web page

Back

Which quotes does JS accepts?

Front

both double and single quotes

Back

What does A reference to non‐existing storage item return?

Front

null

Back

Is Web Storage API included in HTTP headers?

Front

No

Back

How to return the value encoded in JSON in appropriate PHP type?

Front

json_decode(json)

Back

How To convert a JSON object into string?

Front

JSON.stringify()

Back

How To retrieve a stored item:?

Front

.getItem(key)

Back

What is ECMAScript?

Front

(ES) is the official name of the JS language a scripting‐language specification

Back

What is TypeScript?

Front

-TypeScript is an open‐source programming language -Developed and maintained by Microsoft - It is a strict syntactical superset of JavaScript

Back

How to return the value of PI?

Front

Math.PI;

Back

What is JavaScript?

Front

the programming language of HTML and the Web Initial name Mocha, then LiveScript, finally JavaScript best‐known implementation of ES

Back

Set the cookie StartTime with value 100:

Front

document.cookie = "StartTime=100";

Back

How to return the value of x rounded to the nearest integer?

Front

Math.round(x)

Back

Can all pages from one origin store and access the same data?

Front

Yes

Back

name ways to add js to the webpage

Front

dcd

Back

When is the script fetched and executed?

Front

The script is fetched and executed immediately, before the browser continues parsing the page • Longer scripts can cause delay in page loading

Back

When does server resend cookies?

Front

When key=value changed

Back