URL history



  • A lot of websites, including thedailywtf (I refuse to refer to it or access the site by the new name) have a feature that is a form of nav bar at the top that shows you each set you took to get to the page you're currently viewing.  In my experience, these are usually hard-coded, so even if you followed a different path, you still get the "straightforward" path.  This isn't necessarily a bad thing, but apparently some people would prefer that it be the actual path you took... I've seen this often done using cookies.  One way I have never seen it done is by adding plain text to the URL:

    I haven't studied it in depth, but it appears that most, if not all, of the pages on that site are created that way.  Now here's The Real WTF: it seems that those history strings actually determine what page you're viewing!



  • I believe those are commonly called "breadcrumbs"

    And yeah, they act kinda funny. If I change one, I get a 404. Hmm?
     



  • @Yanroy said:

    In my experience, these are usually hard-coded, so even if you followed a different path, you still get the "straightforward" path.

     I think there are two different kinds of  what is referred to as "breadcrumbs". Some sites use the dynamic, cookie/URL based version you described and some use the "hardcoded" version. However, I don't think the hardcoded ones are just lazy implementations of the first ones but they have a completely different purpose:
    While the dynamic breadcrumbs act like a mini version of the browser history, the hard coded ones are more like a file path, showing you in which section/subsection/subsubsection of the site you are right now and "where" in the site this place is. "Hardcoding" the path here makes sense, because there may be different ways to get to a page but there is only one point where it is "located".

    This is the case with the breadcrumbs on this page for example. You didn't necessarily arrive here via "Main page" > "Forum list" > "Side Bar Forum". But this thread is a subsection of the "Side Bar" forum, is a subsection of the DailyWTF forums, is a subsection of TheDailyWTF. I personally find thissystem more helpful than a trace of the sites I visited because I can simply look that up in my browse history.

    As for the URL, yeah, that looks very painful. Reminds me of the CMS from hell, phpNuke, where they found out which action to do on POST by comparing the caption of the button that was pressed. Should I mention the site was localized?



  • @Yanroy said:

    <A title=http://www.mass.gov/?pageID=ocasubtopic&L=9&L0=Home&L1=Government&L2=Our+Agencies+and+Divisions&L3=Department+of+Public+Utilities&L4=DPU+Divisions&L5=Electric+Power+Division&L6=Electric+Industry+Restructuring+in+Massachusetts&L7=Generation+Service+Information&L8=Active+Licensed+Competitive+Suppliers+and+Electricity+Brokers&sid=Eoca href="http://www.mass.gov/?pageID=ocasubtopic&L=9&L0=Home&L1=Government&L2=Our+Agencies+and+Divisions&L3=Department+of+Public+Utilities&L4=DPU+Divisions&L5=Electric+Power+Division&L6=Electric+Industry+Restructuring+in+Massachusetts&L7=Generation+Service+Information&L8=Active+Licensed+Competitive+Suppliers+and+Electricity+Brokers&sid=Eoca" mce_href="http://www.mass.gov/?pageID=ocasubtopic&L=9&L0=Home&L1=Government&L2=Our+Agencies+and+Divisions&L3=Department+of+Public+Utilities&L4=DPU+Divisions&L5=Electric+Power+Division&L6=Electric+Industry+Restructuring+in+Massachusetts&L7=Generation+Service+Information&L8=Active+Licensed+Competitive+Suppliers+and+Electricity+Brokers&sid=Eoca">http://www.mass.gov/?pageID=ocasubtopic&L=9&L0=Home&L1=Government&L2=Our+Agencies+and+Divisions&L3=Department+of+Public+Utilities&L4=DPU+Divisions&L5=Electric+Power+Division&L6=Electric+Industry+Restructuring+in+Massachusetts&L7=Generation+Service+Information&L8=Active+Licensed+Competitive+Suppliers+and+Electricity+Brokers&sid=Eoca

    I haven't studied it in depth, but it appears that most, if not all, of the pages on that site are created that way.  Now here's The Real WTF: it seems that those history strings actually determine what page you're viewing!

    I tried changing one of the arguments, and I got a 404. my guess is that is the directory path to the file.  Instead of actually showing you the file path, they are using some proxy script to map a query string to a filelocation on the server.  I wonder what content management system they are using...


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.