Closed Bug 1288923 Opened 8 years ago Closed 6 years ago

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

Categories

(Firefox for Android Graveyard :: General, defect)

47 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: blacky_2k2, Unassigned)

Details

Attachments

(2 files)

2.01 KB, application/x-javascript
Details
36.97 KB, text/html
Details
Attached file 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>
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.
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
Component: Untriaged → General
Product: Firefox → Firefox for Android
Attached file 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.
I narrowed it down to history.replaceState(null, "Website", "?" + url);
If I comment this line, the full page refresh is no longer triggered.
Hi,

Is this issue still reproducible?

Thanks!
Flags: needinfo?(blacky_2k2)
This was eventually fixed. You can consider this bug closed.
Flags: needinfo?(blacky_2k2)
Hi,

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

Thanks,
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: