There are already too many questions/threads regarding mysterious double request of routes. Everyone pointed to favicon.ico thing.
But unfortunately not working for me! I tried with app.use(express.favicon());
Now I have added commented the above app.use statement and added <link rel="shortcut icon" href="http://cdn.sstatic.net/stackoverflow/img/favicon.ico"> to the main template. Still nothing. Tried short-circuiting it, still nothing.
I have a route view counter, which shows a doubled value. And I assume, its also consuming double resources.
GET /login 200 65ms - 2.5kb
GET /login 304 66ms
This is how it logs in the terminal. How can I stop this?
(I tested it with cURL via command-line, no issues at all)
This was confusing as all over the internet this issue is solved by rectifying the favicon thing.
But this was stupid jquery $.get() call which was firing blank (it was calling the same url as the page url) when the variable was not present. I wrapped the ajax call and problem solved.