Q:

'location-changed' event not fired on user pressing back button

I am trying to listen to when the location changes so that I can fire a websocket request to my server to update the state on the page.
I am listening to the location-changed event:
app.listen(window, 'location-changed', '_updateScreen');

This fires if I click a hyperlink on my page:
<a href="new/location/">My link</a>

However, it doesn't fire if I click the back button on my browser...is this a bug or am I doing something wrong?
<template is="dom-bind" id="app">
    <app-location route="{{route}}"></app-location>
    <app-route route="{{route}}" pattern="/:page" data="{{data}}" tail="{{tail}}"></app-route>
    <a href="new/location/">My Link</a>
</template>
<script type="module">
    "use strict";

    window.addEventListener('WebComponentsReady', (e) => {
        app._updateScreen = () => console.log('update');
        app.listen(window, 'location-changed', '_updateScreen');
    });
</script>

A:

when pressing back button it's not location-changed event that fired but popstate event, so you need to listen to both event. check the example in iron-location here line 146-147

