I am writing client side applications, but regularly run into an issue whereby I am using to much memory on a lower end device and it stops processing javascript to compensate for this. This appears to be a common 'solution' to this problem on lower end devices.
Is there any reasonable way to detect memory usage and/or limits or when the limit has been reached and scripts are failing, etc.
If I can detect this, I can implement solutions to handle it (like limit caching, more lazy loading, etc.)
Please do not mark my question as duplicate to a question whose only answers are about how to detect memory usage and not about estimating memory limitations!
This might help you:
http://www.monitis.com/blog/2011/05/15/30-tips-to-improve-javascript-performance/
As for page performance:
Use 'Profiles' tab in chrome developer window(press F12 to fire it up)
Firebug profiler in Firefox