olivernn / davis.js

RESTful degradable JavaScript routing using pushState
http://davisjs.com
532 stars 58 forks source link

request.isForPageLoad having issue while coming back to original server rendered url #85

Open maheskrishnan opened 11 years ago

maheskrishnan commented 11 years ago

let say i have a pages '/home' and '/settings'. and i have 2 handlers for this.

var app = Davis(function () {
          this.get('/home', function (request) {
            alert(request.isForPageLoad);
          });
          this.get('/settings', function (request) {
            alert(request.isForPageLoad);
          });
        })
app.start()
  1. i am landing on page '/home'
  2. handler is called (for '/home'), request.isForPageLoad is TRUE.
  3. navigating to '/settings' , handler is called (for '/settings'), request.isForPageLoad is FALSE
  4. click back button, handler is called (for '/home'), request.isForPageLoad is TRUE. which should not be the case.
bheithaus commented 10 years ago

+1

Just discovered this same problem!