Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't reload the viewerjs web page in ios mobile. When I reload the web page it shows the pop-up that asks "if you want to download the page" #612

Closed
JihyeYoon1 opened this issue Sep 5, 2023 · 1 comment

Comments

@JihyeYoon1
Copy link

Describe the bug
I just want to reload the mobile web page (viewerjs page) with ios(16.6) (including chrome, safari..).
When I reload the web page by location.reload() or location.href = ''; method, there is one error which is showing the pop-up that asks "if you want to download the page". I have downloaded the page, it was PDF and 0KB. I found this error's only prompted for ios. Android doesn't have this error. The code that I used is below.

$(function(){
window.addEventListener("resize", function() {
	      location.reload();
	    });
	});

//viewerjs code and others

I think this error is related with viewerjs because I tried this code in other web page that doesn't have viwerjs, and it has reloaded well without popup alert. The error is only causing in the web page that using viwerjs library.

Please let me know how can I reload the viewerjs page?

I want to reload the page whenever the orientation has been changed on a mobile, if not the customized viewerjs code cause some error when orientation has been changed. But it i reload the page, viewerjs page is working well without errors. That's why I want to reload the page.

@JihyeYoon1 JihyeYoon1 changed the title "location.reload()" method is not working in the mobile web page (ios mobile phone) can't reload the viewerjs web page in ios mobile. when i reload the web page it shows the pop-up that asks "if you want to download the page" Sep 5, 2023
@JihyeYoon1 JihyeYoon1 changed the title can't reload the viewerjs web page in ios mobile. when i reload the web page it shows the pop-up that asks "if you want to download the page" Can't reload the viewerjs web page in ios mobile. When I reload the web page it shows the pop-up that asks "if you want to download the page" Sep 5, 2023
@fengyuanchen
Copy link
Owner

It is not an issue of the Viewer.js itself. Please try to reload another page in the iOS browser for checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants