What is the difference between Windows.history.back() and history.back() for Firefox OS?

StackOverflow https://stackoverflow.com/questions/22300230

  •  12-06-2023
  •  | 
  •  

Question

I am developing some apps for FFOS , and I don't know what is difference between Windows.history.back() and history.back() and where is it recommend to use each one for FFOS. What is the recommendation for each of the following:

  • Hosted apps?
  • Package apps?

Thanks!

Was it helpful?

Solution

@Vedsa, both calls refers to the same method, being 'window' optional.

For security reasons the History object doesn't allow the non-privileged code to access the URLs of other pages in the session history, but it does allow it to navigate the session history.

Here you can find more about windows properties and methods

Which one is recommended for Hosted x Packeged apps?

As I mentioned earlier, they are calling the same method, and can be considered aliases. Having said that, there is really no difference on which you're going to use if it's a hosted or a packaged app.

The main difference between hosted vs packaged apps is that in the first, you're hosting the package on your end, providing just a url to it so that the Marketplace has a reference to it. On the other hand, when building a packaged app, you're handing a full self-containing app packaged to the marketplace, so that they can host it for you and distribute on the Marketplace.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top