Friday, June 3, 2011

How do you change the link of a web page?

When you put a web address on a page, (For example, www.facebook.com) how can you change it to say what you want? (EG- to just 'Facebook')How do you change the link of a web page?you can only if you are able to access and therefore amend the source code of the page.

This is not the case in FaceBook or other user-assited websites simply for security reasons.



Example:

the source code for your link www.facebook.com appears like that in the source code:

%26lt;a href=%26quot;http://www.facebook.com%26quot;%26gt; www.facebook.com %26lt;/a%26gt;

it is evident you would like something like:

%26lt;a href=%26quot;http://www.facebook.com%26quot;%26gt; Facebook %26lt;/a%26gt;



the problem is that HTML code (used for the %26lt;a%26gt;%26lt;/a%26gt; tags) can include malicious JavaScript code.

For instance, the following code will show an endless message box:

%26lt;a href=%26quot;http://www.facebook.com%26quot; onClick=%26quot;javascript:for( i=1;i%26lt;0;i++) {alert('Click again!');}%26quot;%26gt; Facebook %26lt;/a%26gt;

Also, accessing the source code of a link will enable a user to change the target url (href=??) to redirect the user to download a virus or a forging webpage.How do you change the link of a web page?If using HTML,

%26lt;a href=%26quot;http://www.facebook.com%26quot;%26gt;Facebook%26lt;…How do you change the link of a web page?That is not possible, because the url is a code the browser can understand, maybe there is a slight chance there is an addon for mozilla firefox which can do that for you.



With kind regards,



Whitebird