title: Polymer Routing - history management
body: <p>I'm trying to implement routing using the following code :</p>
  
  <pre><code>HTML :
  
  &lt;app-location route="{{route}}"&gt;&lt;/app-location&gt;
  &lt;app-route
  route="{{route}}"
  pattern="/etw/:page"
  data="{{routeData}}"
  tail="{{subroute}}"&gt;&lt;/app-route&gt;
  
  &lt;iron-pages
  selected="[[page]]"
  attr-for-selected="name"
  fallback-selection="view404"
  role="main"&gt;
        &lt;my-view1 page="{{page}}" name="view1"&gt;&lt;/my-view1&gt;
        &lt;my-view2 page="{{page}}" name="view2"&gt;&lt;/my-view2&gt;
        &lt;my-view404 page="{{page}}" name="view404"&gt;&lt;/my-view404&gt;
  &lt;/iron-pages&gt;
  </code></pre>
  
  <p>And the script is : </p>
  
  <pre><code> static get observers() {
      return [
        '_routePageChanged(routeData.page)',
      ];
    }
   _routePageChanged(page) {
      // Polymer 2.0 will call with `undefined` on initialization.
      // Ignore until we are properly called with a string.
      /*if (page === undefined) {
        return;
      }*/
  
      // If no page was found in the route data, page will be an empty string.
      // Deault to 'view1' in that case.
      this.page = page || 'home';
      document.body.scrollTop = document.documentElement.scrollTop = 0;
      // Close a non-persistent drawer when the page &amp; route are changed.
      /*if (!this.$.drawer.persistent) {
        this.$.drawer.close();
      }*/
   }
  
   _pageChanged(page) {
      // Load page import on demand. Show 404 page if fails
      var resolvedPageUrl = this.resolveUrl('my-' + page + '.html');
      Polymer.importHref(
          resolvedPageUrl,
          null,
          this._showPage404.bind(this),
          true);
   }
  </code></pre>
  
  <p>Everything works fine, but when I try to visit second view (view2) and then use browser back button. Only the URL on the screen changes but not the view. I looked into it and found that _routePageChanged(page) method is not getting called. any ideas?</p>
  
  <p>One weird observation, I am experiencing the issue on a remote server running Apache 2.4.23, but not on Apache 2.4.18 or Nginx running on my localhost. I am not sure if this information is relevant.</p>