We could determine what device a session was on but now with Web 2.0 that seems to have disappeared. Now we can see that the operating system is iOS but not whether it’s a desktop or iPad. The difference can be important.
Does anyone know how to determine what device a session is on in Web 2.0?
Try adding this to session. You get the browser headers.
Sub Opening() Handles Opening
Apparently I cannot paste the code now to create the event handler. So you have to create the event manually.
the raw header includes the operating system, but not the device
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/184.108.40.206 Safari/537.36
Right, I can get Safari and iOS but not whether it’s on a desktop or iPad
Can you paste me IOS and OSX headers please? They usually contain enough info to work it out.
if you can explain something. I program on Windows and only test on iOS and iPad. Can I get the header to show up on Windows somehow?
I don’t know what you mean. When the browser accesses the web app it’s headers are captured. I saved them in the session and put them in a textarea on the webpage once it opened.
You could access them from your “messages” tab if you “Print” the headers out.
Launch the debug web app on Windows and connect to it with your iPad, with its URL: 192.168.1.11:8080 (replace 192.168.1.11 with the IP of the Windows computer and 8080 with the chosen port in Xojo).
Then, when the iPad connects, you’ll get the same debug context.
Determining the device type was used by advertisers to track users, so Apple no longer announces device type in the User Agent string starting with iOS 13.
You will need to look at the page dimensions and make your layout determination that way.
That’s unfortunate because showing a pdf in an html viewer on the iPad isn’t working, but showing it in a new window is.
This could be resolved (Kinda) by creating a way for users to remain logged in . . . Nothing hey enter is important, but the clients shouldn’t access to each other’s files
It sounds like your actual problem is that you aren’t able to consistently display a PDF?
Try this workaround (via @Martin_T in another thread)
var url as String = "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
HTMLViewer1.LoadURL("https://drive.google.com/viewerng/viewer?embedded=true&url=" + url)
Better way to PDF:
I have a html viewer on a webpage, w as webfile property, with a button with this code:
dim f as new FolderItem(“c:\users\daniel\downloads\dummy.pdf”)
w = new WebFile
w = webfile.Open(f)
w.MIMEType = “Application/PDF”
Does not need to be online to work and provides pdf controls. Works in desktop with a html viewer as well.
Works great on a desktop. Doesn’t work at all on an iPad
What would you use as your smallest desktop screen size?
1920x1080 is generally going to be about the smallest nowdays.
That the resolution not the screen width and height isn’t it?