Proper URL forming with Query String and Anchor Hashtag

Dan picture Dan · Oct 2, 2012 · Viewed 59.3k times · Source

When both a query string and anchor tag (hash tag) are visible in a URL, what is the proper order for them to appear?

http://www.whatever.com?var=val#anchor

or

http://www.whatever.com#anchor?var=val

Is there any documentation on this?

update: The URLs are being handled by Wordpress / PHP

Answer

blitzmann picture blitzmann · Oct 2, 2012
?var=var#hash

everything after # is client side.

Also, look into url rewriting to get rid of ugly ?var=var