Retrieving url parameters


My app is embedded in an iframe and I’m trying to retrieve the url parameters. I’m printing out the pathname within the callback that executes when dcc.Location changes url…

print(‘You are on page {}’.format(pathname))

However when I check the Heroku logs all I get is…

You are on page //

Even though I can see the correct url displaying in the component updates:

POST /_dash-update-component HTTP/1.1" 200 321 “”`

I’m using the latest versions of dash as I know there was a recent update to facilitate this. Am I missing something?


You might have already done this, but I find a sanity check never goes astray, just to make sure you really are using the version you think you are:

>>> import dash_core_components as dcc
>>> dcc.__version__


Yep always good to double check - “unfortunately” i’m using the latest version ‘0.15.5’


See the new search property to get the query parameters or the new href property to get everything. For usage, see this integration test:


Thanks very much! Working now.