Skip to main content

What Javascript can't do

  • Javascript cannot read from or write to files on the server. Because Javascript is running in the web browser after the web page has been copied from the server, it therefore cannot interact with the server (the computer that the web page was copied from) in any way.
  • Javascript cannot interact with server side scripts. Any server side scripts are run before the web page is downloaded to the browser. This means that a server side scripting language such as PHP or ASP can update the content of your Javascript code before it is downloaded. Since the Javascript itself isn't run until after the page has been downloaded the Javascript is not able to affect the server side script because that has already finished running. The only way that Javascript can pass information back to a server side script would be to reload the page passing the required information from Javascript as a query string on the end of the page address.
  • avascript cannot read from or write to files in the client. Even though Javascript is running on the client computer the one where the web page is being viewed) it is not allowed to access anything outside of the web page itself. This is done for reasons of security since otherwise a web page would be able to update your computer to install who knows what. The only exception to this are files called cookies which are small text files that Javascript can write to and read from. The browser restricts access to cookies so that a given web page can only access cookies created by the same site.
  • Javascript cannot close a window if it didn't open it. Again this is for security reasons.
  • Javascript cannot access web pages hosted on another domain . Even though web pages from different domains can be displayed at the same time, either in separate browser windows or in separate frames within the same browser window, the Javascript running on a web page belonging to one domain cannot access any information about a web page from a different domain. This helps to ensure that private information about you that may be known to the owners of one domain is not shared with other domains whose web pages you may have open concurrently.
  • Javascript cannot protect your page source or images. Any images on your web page are downloaded separately to the computer displaying the web page so the person viewing the page already has a copy of all of the images by the time they view the page. The same is true of the actual HTML source of the web page. The web page needs to be able to decrypt any web page that is encrypted in order to be able to display it. While an encrypted web page may require Javascript to be enabled in order for the page to be able to be decrypted in order for it to be able to be displayed by the web browser, once the page has been decrypted anyone who knows how can easily save the decrypted copy of the page source.
--
 Regards
Anuj Kumar Rathi

Comments

Popular posts from this blog

How to Prevent Users to Press F5 key (Refresh button)

Some times we want to prevent user to Press F5 key to prevent Page Refresh. You can use the below script. Paste this code in the Head Section of your Page. <script language=javascript> document.onkeydown = function(){ if(window.event && window.event .keyCode == 116){ window.event.keyCode = 505; // Capture and remap F5 } if(window.event && window.event .keyCode == 505){ // New action for F5 return false; // Must return false }} </script>

Access Different interface method with same Name implemented in a class

We use interface and multiple interface inherit it into class, then we implement the methods of interface as it is necessary but what will happen if two interface have the same mentods with same signature and inherited in the same class? Now questions arises from here are : Q1) Both the methods will be implementable which is with the same name and signature? Q2) If methods are implementable then how it is possible? Q3) If it is possible then can we access both the methods? Q3) If it is possible then what is the way to access these methods publically? The answer of all the above question is below: 1) Yes both the methods with same name and signature is implementable. 2) we have to implement interface explicitely preceding with iterface name. 3) Yes it is possible to access the methods. 4) Yes we can

Should have on tips of our lips.........ACID PROPERTIES

Introduction    When ever we process any DML statements transactions are implicitly called. Ie. when ever no begin  transaction statement insert ,delete, update statements will have transaction statements around them implicitly. ACID concept is one of the oldest and important properties of the Database. It sets forward four goals that every database management system must strive to achieve: atomicity, consistency, isolation and durability. No database that fails to meet any of these four goals can be considered reliable. Atomicity Atomicity states that database modifications must follow an "all or nothing" rule. Each transaction is said to be "atomic." If one part of the transaction fails, the entire transaction fails. It is critical that the database management system maintain the atomic nature of transactions in spite of any DBMS, operating system or hardware failure. Consistency Consistency states that only valid data will be written to the database. If,...