Firefox mobile reloads whole page when it should load only a certain area

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
2 years ago
a month ago

People

(Reporter: blacky_2k2, Unassigned)

Tracking

47 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

2.01 KB, application/x-javascript
Details
36.97 KB, text/html
Details
(Reporter)

Description

2 years ago
Created attachment 8774070 [details]
index.js

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160604131506
Firefox for Android

Steps to reproduce:

Basically we have an website has a fixed framework and inside it there is a div which is changes when pressing buttons and links on the wesbite.It's a sort of like a one page application. We also implemented some javascripts in order to update browser history so that you can use the back and forward buttons of the browser even though this is a one page app. 


Actual results:

The website works great on all browsers and on desktop but on Firefox for Android, especially when the connection is slow, I've noticed a very odd behaviour. The buttons, instead of changing just the content <div> area, they force a refresh of the whole page.


Expected results:

Normally, it should have just changed the content of the content area. I've attached the javascript that controls the way pages are opened and how their history is manipulated. Within the website most buttons and links look something liek this : <a href="#" onclick="OpenPage('someurl') .. > </a>
(Reporter)

Comment 1

2 years ago
To be more exact, on mobile say I am on the address website?article.php and I click to go on the page search (website?search.php). The browser first tries to load the search page into the content area as it should and changes the browser urls accordingly to website?search.php, then for some odd reason, instead of loading the search.php in the content area, it triggers a complete page refresh with the address of the previous page, in this case website?articles.php.

Mind you, this only happens when the connection is slow. My guess is that website?search.php takes too long to respond and the browser has trouble dealing with the javascript for history manipulation and triggers a page refresh.
(Reporter)

Updated

2 years ago
Summary: Firefox mobile reloads whole page when it should load only a certain parts → Firefox mobile reloads whole page when it should load only a certain area

Updated

2 years ago
Component: Untriaged → General
Product: Firefox → Firefox for Android
(Reporter)

Comment 2

2 years ago
Created attachment 8774158 [details]
ffbug.zip

I've added a small working example of how the situation. I can only reliably reproduce the bug on a slow device. For instance if I turn my NEXUS 5 on battery saving mode. Otherwise the full page reload is trigger occasionally.
(Reporter)

Comment 3

2 years ago
I narrowed it down to history.replaceState(null, "Website", "?" + url);
If I comment this line, the full page refresh is no longer triggered.

Comment 4

a month ago
Hi,

Is this issue still reproducible?

Thanks!
Flags: needinfo?(blacky_2k2)
(Reporter)

Comment 5

a month ago
This was eventually fixed. You can consider this bug closed.
Flags: needinfo?(blacky_2k2)

Comment 6

a month ago
Hi,

Taking into consideration Comment 5, I will close this issue as Works for me.

Thanks,
Status: UNCONFIRMED → RESOLVED
Last Resolved: a month ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.