> Alan Trick > If I want a link that points to whatever page i am alread at (without > any querystrings I can use <a href=''> (for example, I'm at > index.php?start=10 and I want to go to index.php) > > Is this allowed?
>From the "Uniform Resource Identifiers (URI): Generic Syntax" RFC: http://www.ietf.org/rfc/rfc2396.txt "4.2. Same-document References A URI reference that does not contain a URI is a reference to the current document. In other words, an empty URI reference within a document is interpreted as a reference to the start of that document, and a reference containing only a fragment identifier is a reference to the identified fragment of that document. Traversal of such a reference should not result in an additional retrieval action. However, if the URI reference occurs in a context that is always intended to result in a new request, as in the case of HTML's FORM element, then an empty URI reference represents the base URI of the current document and should be replaced by that URI when transformed into a request." So, in short, if you have a link with an empty href, it will jump you to the top of the current document, but NOT reload it or send any other request to the server. If you do want to have the current document reloaded, then you need a proper URI in there. If it's the index file you're currently on, you could use href="./", for instance. Or, if you're already using PHP, why not href="<?php echo $_SERVER['PHP_SELF'];?>" ? Patrick ________________________________ Patrick H. Lauke Webmaster / University of Salford http://www.salford.ac.uk ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************
