- Javascript cannot access the local file system. You cant read or write files on the user’s computer - its a security feature to prevent sites doing anything they like on your computer (like leave a virus…)
- Javascript cannot access the remote file system either! It used to be the accepted knowledge that you couldn’t even access files hosted on the server…things have changed slightly with the wide-spread support for XMLHttpRequest, but you’ve still only got HTTP to play with - you cant move files around, rename them, change permissions or anything like that on the server using only Javascript.
- Javascript cannot run any application outside the browser. Just like with point 1, this is a security feature to prevent a website doing as it pleases.
- Javascript cannot access your printer/scanner/webcam. Javascript has no direct access to your peripherals without relying on 3rd party tools etc.
- Javascript cannot change the URL displayed by the browser. Again this is for security reasons, otherwise any old site could simply change the displayed URL to look like your Bank’s or PayPal’s etc secure site to trick you into entering your details.
- Javascript cannot change the browser history. For example, you cannot control which page appears if the user clicked on the “back” button in their browser.
- Javascript cannot access your database. If you’ve got a MySQL or SQL Server database on your server, you cannot use Javascript to access it directly - you’ll need to use a server-side language (e.g. PHP, ASP etc) for that.
- Javascript cannot “encrypt” your HTML or prevent “image theft”. It is pathetically easy to circumvent so-called Javascript “security” features, so its not even worth trying. If a user can see your page, they can steal it!
- Javascript cannot control the user’s mouse or keyboard. Sorry but Javascript wont let you “hijack” a user’s mouse and move it to click on your site’s adverts to make you money!
- Javascript cannot use multiple threads. There are some moves afoot to try and create some sort of library to accomplish this, but for now the advice is don’t worry about optimising your Javascript for multiple core CPUs!
|