Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Erica van den Bos
47
Views
2
Comments
Solved
[How To - Lazy load] Refresh page (F5) in Firefox
Question
Forge
How To - Lazy load (O11)
Forge asset by
Francisco Menezes
Hi,
I'm currently implementing the lazy load functionality on one of my web pages. It works great and really adds value to the performance!
But I'm afraid I found a small bug. If I load the testpage in Firefox (v 38.0.5), it works fine. If I then press F5 (after all the Lazy Load is finished), I get an error in the javascript console and my page gets stuck (see attachment).
This is the error:
TypeError: osAjaxBackend is null
Stack trace:
OsEndRequest@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:4692
@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval line 18 > eval:2:1
window.outsystems.internal.jQueryFactory/</<.globalEval/<@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:13993
window.outsystems.internal.jQueryFactory/</<.globalEval@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:13967
OsEvaluateUserJavaScript@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:11838
OsExecuteJSONUpdate@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:13625
OsJSONUpdate@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:10663
@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval line 18 > eval:2:1
window.outsystems.internal.jQueryFactory/</<.globalEval/<@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:13993
window.outsystems.internal.jQueryFactory/</<.globalEval@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:13967
window.outsystems.internal.jQueryFactory/</<.domManip/<@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:25:23865
window.outsystems.internal.jQueryFactory/</<.each@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:14397
window.outsystems.internal.jQueryFactory/</<.domManip@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:25:23730
window.outsystems.internal.jQueryFactory/</<.append@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:25:21008
window.outsystems.internal.jQueryFactory/</<.html/<@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:25:22677
window.outsystems.internal.jQueryFactory/</<.access@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:15853
window.outsystems.internal.jQueryFactory/</<.html@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:25:22243
OsAjaxBaseBackend/this.ShowError@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:8729
OsAjaxBackendXHR/XHRState/this.ProcessFinalResponse@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:16410
OsAjaxBackendXHR/this.SubmitForm/e@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:13992
window.outsystems.internal.jQueryFactory/</$.Callbacks/l@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:18:16833
window.outsystems.internal.jQueryFactory/</$.Callbacks/m.fireWith@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:18:17618
d@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:26:3442
window.outsystems.internal.jQueryFactory/</</<.send/d@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:26:9007
_osjs.js:5:12424
"OsEndRequest@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:4692
@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval line 18 > eval:2:1
window.outsystems.internal.jQueryFactory/</<.globalEval/<@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:13993
window.outsystems.internal.jQueryFactory/</<.globalEval@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:13967
OsEvaluateUserJavaScript@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:11838
OsExecuteJSONUpdate@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:13625
OsJSONUpdate@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:10663
@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval line 18 > eval:2:1
window.outsystems.internal.jQueryFactory/</<.globalEval/<@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:13993
window.outsystems.internal.jQueryFactory/</<.globalEval@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:13967
window.outsystems.internal.jQueryFactory/</<.domManip/<@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:25:23865
window.outsystems.internal.jQueryFactory/</<.each@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:14397
window.outsystems.internal.jQueryFactory/</<.domManip@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:25:23730
window.outsystems.internal.jQueryFactory/</<.append@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:25:21008
window.outsystems.internal.jQueryFactory/</<.html/<@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:25:22677
window.outsystems.internal.jQueryFactory/</<.access@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:15853
window.outsystems.internal.jQueryFactory/</<.html@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:25:22243
OsAjaxBaseBackend/this.ShowError@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:8729
OsAjaxBackendXHR/XHRState/this.ProcessFinalResponse@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:16410
OsAjaxBackendXHR/this.SubmitForm/e@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:13992
window.outsystems.internal.jQueryFactory/</$.Callbacks/l@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:18:16833
window.outsystems.internal.jQueryFactory/</$.Callbacks/m.fireWith@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:18:17618
d@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:26:3442
window.outsystems.internal.jQueryFactory/</</<.send/d@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:26:9007
" _osjs.js:5:12457
not well-formed _osjs.js:1:1
GET
https://osdev01.dev/EricaLazyLoad/null [HTTP/1.1 404 Not Found 2ms]
GET
https://osdev01.dev/RichWidgets/null [HTTP/1.1 404 Not Found 3ms]
TypeError: osAjaxBackend is null
Stack trace:
@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval line 18 > eval:2:1
window.outsystems.internal.jQueryFactory/</<.globalEval/<@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:13993
window.outsystems.internal.jQueryFactory/</<.globalEval@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:13967
OsEvaluateUserJavaScript@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:11838
OsExecuteJSONUpdate@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:13625
OsJSONUpdate@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:10663
OsAjaxBackendXHR/this.EndRequest@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:14614
OsAjaxBaseBackend/this.EndRequestAndCancelPendingRequests@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:9257
OsAjaxBaseBackend/this.ShowError@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:8767
OsAjaxBackendXHR/XHRState/this.ProcessFinalResponse@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:16410
OsAjaxBackendXHR/this.SubmitForm/e@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:13992
window.outsystems.internal.jQueryFactory/</$.Callbacks/l@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:18:16833
window.outsystems.internal.jQueryFactory/</$.Callbacks/m.fireWith@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:18:17618
d@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:26:3442
window.outsystems.internal.jQueryFactory/</</<.send/d@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:26:9007
_osjs.js:5:12424
"@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval line 18 > eval:2:1
window.outsystems.internal.jQueryFactory/</<.globalEval/<@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:13993
window.outsystems.internal.jQueryFactory/</<.globalEval@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:18:13967
OsEvaluateUserJavaScript@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:11838
OsExecuteJSONUpdate@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:13625
OsJSONUpdate@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36 line 18 > eval:5:10663
OsAjaxBackendXHR/this.EndRequest@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:14614
OsAjaxBaseBackend/this.EndRequestAndCancelPendingRequests@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:9257
OsAjaxBaseBackend/this.ShowError@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:8767
OsAjaxBackendXHR/XHRState/this.ProcessFinalResponse@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:16410
OsAjaxBackendXHR/this.SubmitForm/e@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:65:13992
window.outsystems.internal.jQueryFactory/</$.Callbacks/l@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:18:16833
window.outsystems.internal.jQueryFactory/</$.Callbacks/m.fireWith@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:18:17618
d@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:26:3442
window.outsystems.internal.jQueryFactory/</</<.send/d@https://osdev01.dev/EricaLazyLoad/_osjs.js?9_0_0_36:26:9007
The platform we use is Java.
To be honest I'm not really sure where to start debugging :)
Hope you can help me with this!
Thank you,
Erica
lazy_load_firefox.png
Erica van den Bos
Solution
I have found the solution to this problem.
The problem is when you click F5 in Firefox, Firefox remembers the viewstate without the RefreshLink (since it is in the False node of the if-statement, and not on the screen anymore). Therefore it cannot find the link after pressing F5 and throws an error.
To fix this, just move the Refreshlink and script-expression out of the if-statement. Since it has style display:none it does not effect your screen.
Francisco Menezes
Staff
Hi Erica,
Excelent solution! Thank you very much :)
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...