The Limitations of Java Script
The Javascript comes with its own distinct advantages and benefits that go a long way in enhancing the look and feel of the web pages.
They improve your site in a way such that, potential visitors are attracted to site and thus Javascript also attracts a huge number of traffic to your site.
However, Javascript is not without its limitations, and a potential user must be well aware of them to maximize the efficacy of the application. Some of these restrictions are because a Javascript has no access to the server but only runs in the browser window. This is a result of the security benefits of Javascript, which do not allow the webpage to tamper the working of the computers.
It must be said here, that very little or nothing can be done to circumvent these limitations. However, to be made aware, is to be prepared.
Files on the server, cannot be read or be written by Javascript
Javascript runs on the web browser and cannot gain access to the server. The Javascript starts running as soon as the web pages have been downloaded/copied from the server. Therefore, any interaction with the server is impossible.
Server side scripts and javascripts cannot interact with each other
A server side script runs, before you download the webpage on to the browser. What this means is that the all content of the javascript code is updated by the server side scripting languages, like ASP or PHP, before the page is downloaded.
The javascript is run after the web page has been downloaded and hence it does not affect the running of the server side script. Only when the page has to be reloaded, can some kind of information be passed on to the server side script.
No client files can be read or be written by Javascript
Javascript is not authorized to access any information from the client computer and has to limit itself to the working of the web page. Security is one of the prime reasons for this restriction. If javascript could access the client computers, then a webpage could install all kinds of applications on the client computer.
However, cookies, which are small text files, can be read by javascript, and hence these can be installed onto the client computer.
Web pages hosted on different domains cannot be accessed by Javascript
Webpages hosted on different domains can be opened in the same browser window or can also be opened in different browser windows. However, the javascript belonging to one domain cannot get access to the information found on a webpage on a different domain.
This helps in maintaining the confidentiality of all kinds of private information of the client and that this information is not shared by different domains.
Javascript is unable to protect the source or your images of the page
Images are downloaded separately by the browser and therefore, you already have a copy of the images even before the whole webpage downloads. The web browser has to de-encrypt the webpage before it displays any kind of content or images.
These limitations must not be considered the disadvantages of using Javascript, as it is only the protection offered by Javascript in terms of security, which results in these restrictions.
