Simple scenario: User visits site and clicks on small image to enlarge it - large image opens in popup with transluscent dark overlay.

When user refreshes the page or shares the link, should the popup image be displayed or not? What do you think are the pros/cons of this?

To clarify we're talking about content oriented popups - with image or text, not dialogs.

enter image description here

4 Answers 4


Browser Screen can get refreshed in at least three of the given scenarios:

  1. User is not sure how to close the popup which has taken full screen and he refreshes the browser to try to get back at where he was before the popup

  2. User thinks that image in the popup hasn't loaded properly enough and he might refresh the browser to load the popup again

  3. Browser window has crashed and refreshes itself


  1. In my opinion, Scenario 1 is the most probable reason. So, if you decide to refresh the page to the home screen of the popup, PRO would be that it is what user desired. CON 1 would be that if user actually refreshed the screen due to Scenario 2 and hence he would not be happy with the result. And CON 2 (huge Con) would be that he would not be able to share the direct link to the image in social sites. So, this treatment will not work in favor of you.

  2. Workable solution for you would be to only refresh the popup screen on display and not the whole browser window. You may want to make the Close button more clear and apparent. Also, the link in the address bar should be specific to the image popup currently in display and hence can be shared effortlessly and which would also ensure that it refreshes to the current popup on display. Big PRO of this approach is that user would be able to share the image easily on any social site or otherwise. Another PRO would be that it would clearly negate the Scenario 1 given above by making the close button more apparent and clear.


Is popup content context-independent?

That's the question you should find an answer to and then you will be able to choose the correct behaviour:

  1. Popup content is independent of the context. For example, a gallery popup with a photo at a photo hosting. User traverses through the photos one by one and should be able to share a link to the certain photo (same for page refresh: I wish to continue to browse the photos). It's actually not a popup at all, it's just a view which doesn't replaces the content but appears above it and expands to the full screen.

  2. Popup content is a part of the context, i.e. an image popup within an article about travel, etc. So the article itself is a main content and enlarged image has no meaning for the user without the context. In this case it seems like a shared link should point to the article itself.

Your popup is more likely to be context-dependant (case 2), so I think you should not display the image popup on refresh or link share.


Normally the refresh feature is used for updating the site content, or used as a flush to clear the site of any user input.

A question that I ask regarding this is whether the user could get anything out of refreshing the page with the modal image still present, is there any dynamic behaviour that can be presented first after a refresh Eg. a comment section for the image that isn't automatically populated with new comments?

When looking at how facebook handles this, they link the user to a dedicated page for the image being shown in the modal. This is however, as far as I'm concerned a confusing approach and could easily get the user disoriented.

If there isn't any dynamic behaviour and each image will stay the same after a refresh I would argue that clearing the modal and refreshing the page is the correct approach.


I would say that on page refresh no, you should not continue to show a modal.

Modals are, by their nature, intended only for limited, transient information that is used to supplement or enhance the main content. If the information being shown in them is important enough to be displayed as the main content on a page refresh then they should most likely be in a page of their own.

Also you need to consider the users expectations. I would be very surprised (and probably a little annoyed) if a modal refused to go away when I expected it to (which would be choosing an action, clicking outside it, closing it with a close button or hitting the refresh or back button).

On sharing a link however, there is no need to change what is being viewed on the page at all as a link share can be incorporated directly into the modal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.