Why file handling is not in java script but there is local storage in html5? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why file handling is not in java script but there is local storage in html5?

JS is a scripting language. It doesn't provide any file handling. Yeah! you can say to prevent security issues file handling is disabled in JavaScript. If that's the case why there is local storage in Html5?

24th Jun 2017, 1:07 AM
Raghul
Raghul - avatar
1 Answer
+ 5
Local (and session -- web) storage provide a new generation of cookie-like feature, which offer some limited space to store data on user side inside browsers, without access to the user file system: it's security safe, contrarly to if local file handling was available (imagine the facility to delete your whole hard disk content else)... Web storage only provide a key-value data structure storage accessible just by a web domain/site (as cookies, but without be transmitted implicitly to server at each Http request, and offering more space).
24th Jun 2017, 5:00 AM
visph
visph - avatar