Eladerezador
Eladerezador

Reputation: 1301

IBM MobileFirst - App Multipage

Good morning,

I am installing a APP with IBM MobileFirst Platform and seen in the documentation, by making an APP multi page, you should avoid the attributes href and document.location.href of javascript. I have verified that the system used is that of a single page and upload the content in div with jquery load () function.

Is strictly necessary this requirement or I can continue using href and document.location.href? I say this, because in my APP, the header and footer, change in each html page and I do not want to reload the html page with many divs, shown and hidden.

What you recommend to resolve this issue? How I can connect different html pages in MobileFirst, without using href or document.location.href?

Thank you.

Best Regards,

Upvotes: 1

Views: 158

Answers (1)

Yoel Nunez
Yoel Nunez

Reputation: 2118

The reason why it is recommended to load the page contents via ajax is because MobileFirst libraries are loaded in the main html file. Loading other html files would require you to include all the MobileFirst libraries "including cordova" in every single html file of your application. Doing that will decrease the performance of your application since you will have to load all the library files for each page. It may also cause some conflicts with the objects loaded into the DOM since they may be loaded already.

Upvotes: 1

Related Questions