Hacking around with JavaScript

Introduction

Quite often when building web pages we tend to rely on certain techniques trying to make the users “play by the rules” and utilize the web pages in a predictable way. In fact, we rely on them so much that sometimes we forget that their power can be turned against our purpose.
Indeed, JavaScript, “the great and the mighty” can become a dangerous weapon in skillful hands and used not to our advantage.

Once you realize how easy it is for a “total stranger” to “beat up” your web page you may decide to review your good techniques and utilize other tools to strengthen the “line of defense”.

Most of the tricks described in this article are pretty basic and can be put to use by a novice programmer.
After reading the article you will learn a few tricks which may help you with the following:

  • Debugging your own web applications
  • Bypassing bugs and glitches when using web sites built by someone else
  • Minimizing chances for someone trying to use some of those techniques on your web pages.
  • Staying informed of the various possibilities and being prepared to take corresponding actions.
$2.89
- OR -

Overview

Getting started

First of all I would like to remind you that there is absolutely no way to protect your images as well as HTML, JavaScript and CSS source from stealing. Anything you can view in your browser can be saved on a user’s hard drive and “cut open”. One can encounter some difficulties with certain types of content (like Flash, Java applets or WMV with DRM protection), but at the end it all depends on the individual’s level of determination.
Data security on the other hand is entirely different topic which we won’t be discussing today.

The approach

You can execute JavaScript code on a page by typing “JavaScript: somecode;” in the browser’s address bar and hitting Enter.
The code will immediately execute as long as the syntax is correct. When assigning values you have to include the assignment within the void() method as in void(some_variable=some_value). Otherwise the browser will jump to a blank page and output the variable on that page. Remember that!

Alex July

Alex JulyAlex July is a Vancouver-based (Canada, British Columbia) Web Developer/ Graphic Artist who has an extensive experience in both creative realms.
He is also a host of Linecraft.com where he is showcasing his skills and sharing experience with the developers community. For the past 3 years Alex has been focusing on the development of Rich Internet Applications using Macromedia Flash technology.

When away from the computer Alex is practicing Martial Arts, playing guitar and enjoying time with his wonderful family.

See All Postings From Alex July >>

Reviews

Be the first to write a review

You must me logged in to write a review.