­ Many situation of ill repute practice a proficiency that causes the following distressing situation : When you assay to pull up stakes the situation , either by using the Back clit or by closing the web browser app window , the site reappear in a new windowpane . In the defective subject , the internet site pop up in three or four new windows when you endeavor to leave it , and fundamentally the only way out is to shut down yourcomputer . The way most people get trapped into these site is through itemisation insearch enginesthat depend legitimate until you press them .

The agency these site mould is as follows . If you have read the HowStuffWorks articleHow Web Pages Work , you know that the HTML computer code for the simplest Web pages looks like this :

The tag marks the source of the consistency of the page . You are allow to modify the torso tag . For example , if you alter it so it search like , then the background colour of the page will be yellow .

A web address displayed on a computer screen.

All major browsers today corroborate a capability calledJavaScript , and JavaScript allows you to plant code in a page . Using JavaScript , one of the modifiers you may total to the dead body tag end isonUnload . For instance , you’re able to say :

This say , " When the web internet browser attempts to unload the page ( either by using the Back push button or by closing the window ) , call the JavaScript function namedreplay . " At the top of the page , thereplay functionis a belittled JavaScript social occasion that looks like this :

When the instant replay function gets called , you may see that all it does is open a novel windowpane that contains whatever page is requested ( here , it ’s www.blahblahblah.com ) . There ’s nothing to kibosh the Jehovah of the Web Thomas Nelson Page from opening upmultiple windows– simply adding four moreopenlines to the replay role will do five raw windows to open up . If they all do the same thing , your screen quickly fills with piles of windows . That ’s when you have to shut down .

The use of theflagvariable is interesting . That ’s there because if the varlet contains a tie-in , it causesonUnloadto get triggered when the link is click . So the tie-in will carry the follow computer code :

Thisturns off the rematch functionif the user click the link on the Thomas Nelson Page .

There are all kind of other less annoying things you’re able to do with JavaScript . This pagehas lots of tie-in .

Frequently Answered Questions