function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Caroline WojciechowskiCaroline Wojciechowski 

Visualforce Page window height and width for iPhone

The visualforce page is used on the browser and mobile app, however there is a lot of dead space on the left hand side of the landing screen.

How can I format the visualforce page to recognize the size of the device being used and load/fit properly?

Current code:
<apex:page >
<script>
var strWindowFeatures = "location=yes,height=device_height,width=device_width,scrollbars=yes,status=yes";

//
var URL = "LINK";

//Call Function
var win = window.open(URL, "_parent", strWindowFeatures);

</script>
</apex:page>

 
Lokesh KumarLokesh Kumar
Hi Caroline,

Please check the below link for the best practice about VF page compatibility in Salesforce1 and Browser.

https://resources.docs.salesforce.com/sfdc/pdf/salesforce1_guide.pdf 

Page number : 79.

Thanks,
Lokesh