{"id":2955,"date":"2010-01-17T21:34:31","date_gmt":"2010-01-18T02:34:31","guid":{"rendered":"http:\/\/blog.kenperlin.com\/?p=2955"},"modified":"2010-01-17T21:34:31","modified_gmt":"2010-01-18T02:34:31","slug":"live-link","status":"publish","type":"post","link":"https:\/\/blog.kenperlin.com\/?p=2955","title":{"rendered":"Live link"},"content":{"rendered":"<p>Suppose I would like to drop into my web calendar the up-to-date price of an AMTRAK train ticket from New York to Boston on February 17 at 5pm.<\/p>\n<p>That sure sounds easy enough, but it&#8217;s surprising how hard it is to implement.  You can&#8217;t just point to some page on AMTRAK&#8217;s website.  The only way to find the price of a ticket on-line is to enter your start\/destination and time\/date into a web form.  Then AMTRAK then crunches that data for you and generates a page that shows you the current ticket price.<\/p>\n<p>There is nothing in the address field of that results page to indicate which route or date you&#8217;d asked for.  That&#8217;s all done on AMTRAK&#8217;s server &#8212; the page you end up looking at is custom made for you by that server, on the fly.<\/p>\n<p>I was talking today with Murphy Stein &#8212; a colleague and Ph.D. student here at NYU &#8212; and we came to the conclusion that it might be possible to solve this problem with a macro capability.  In other words, you go through your usual process of entering the data into the web form, but you tell your browser to track what you&#8217;re doing, and it stores (somewhere) all the steps you just went through.  It also lets you highlight the price on the results page, and it remembers where you highlighted.<\/p>\n<p>Later, your browser periodically goes on a little web crawl onto AMTRAK&#8217;s site, entering the same values that you did into AMTRAK&#8217;s on-line web form, and then &#8220;clicking&#8221; on the same &#8220;GO!&#8221; button that you&#8217;d clicked on.  Your browser then looks at the place on the results page that corresponds to the number you had highlighted.  Unless things go horribly wrong, there will indeed be a number there (although it won&#8217;t be the same number if prices have gone up).<\/p>\n<p>Every time you look at your web calendar, you will see an up-to-date price (how up-to-date depends on how often your browser goes crawling for updates).<\/p>\n<p>None of this is sure-fire.  For one thing, we are relying on AMTRAK to not change their on-line query form.  For another thing, we are relying on your browser being able to find the price on the updated results page, working just from the location of the price you&#8217;d originally highlighted.  That can turn out to be tricky if AMTRAK hasn&#8217;t designed their page sensibly.<\/p>\n<p>Also, of course, AMTRAK might become unhappy if its customers&#8217; browsers keep revisiting its site on their own every hour or so.  At some point all of those repeat cyber-visits will start to overload company web servers.<\/p>\n<p>So maybe none of this is practical.  But it&#8217;s a nice thing to think about &#8212; being able to create a live and up-to-date link from anywhere to anywhere else on the web.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Suppose I would like to drop into my web calendar the up-to-date price of an AMTRAK train ticket from New York to Boston on February 17 at 5pm. That sure sounds easy enough, but it&#8217;s surprising how hard it is to implement. You can&#8217;t just point to some page on AMTRAK&#8217;s website. The only way &hellip; <a href=\"https:\/\/blog.kenperlin.com\/?p=2955\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Live link&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/2955"}],"collection":[{"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2955"}],"version-history":[{"count":1,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/2955\/revisions"}],"predecessor-version":[{"id":2956,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/2955\/revisions\/2956"}],"wp:attachment":[{"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}