<?xml version='1.0' encoding='utf-8'?> <useragentfile version="1.0" > <Agent name="Max" > <useragentstring>Maxwell Smart</useragentstring> <size high="600" wide="800" /> </Agent> </useragentfile>
MiniWeb is a very simple Web Browser with support for varying user agent strings.
MiniWeb’s purpose is for testing website layouts for different screen sizes and different user agents (browser/device combinations), in particular for different phones. It allows switching user agents on the fly.
It uses an extensible configuration file, with builtin default examples, which sets user agent strings and screen sizes to simulate different phones.
MiniWeb can also be handy to watch small websites when doing other work, such as news tickers, sports scores, weather reports and such things. It provides an automatic reload timer for keeping these things current.
The language and keyboard references in this manual are for English in North America, and similar keyboard layouts. In some locales the keys will have different labels. If you manage to run this on a phone with only a numeric keypad, the shortcuts may not work.
There is one button. It is small and flat in the top left hand corner of the window. It is labelled "Menu". Clicking on the button opens the Main Menu. From the Main Menu all functions are accessible.
There are three menus. The Main Menu and the Settings Menu. You can reach the Main Menu by clicking the button, or by the Ctrl-M shortcut. You can reach the Settings Menu from the Main Menu, or by the Ctrl-S shortcut.
There are dialogs for loading a website, for changing and editing user agents, and for changing the reload timer delay.
Press Ctrl-L, or go to the Main Menu and select Open….
You will get a dialog where you can enter the web sites address (the URL). Enter the URL, and click OK or press Return or Enter.
The Main Menu allows you to access all functions of the program. You can select from these entries:
Quit exits the program
Cancel closes the menu and does nothing
Open… allows you to open a web page, after entering the page using a dialog
Settings… gets you to the Settings Menu
Help… opens the help manual (the one you are reading now) in the browser
License… shows the license in the browser
About… shows the current version of the program
The Settings Menu allows you to change some of the functionality and looks of the browser. You can select from these entries:
Reload Timer allows you to adjust the delay of the reload timer, or to turn off the timer by setting the delay to zero (0).
Frame On/Off switches the window frame on or off. This feature may not work on some versions of Windows. This feature may not make sense if you run this program on a phone.
Portrait / Landscape changes the orientation of the browser, by switching the length of the vertical and horizontal sides
Scrollbar On/Off changes whether there is a vertical scroll bar. On small screens, the vertical scroll bar takes up signigicant space, so it is normally disabled. However this can make scrolling impossible without an approriate pointing device. So for laptops without a mouse wheel, or similar setups, you can enable the vertical scrool bar.
User Agent allows you to change the user agent. You can select a different agent, or the one presently used, from a list of kown agents. This list can be customized by editing the Agent List File. You can also edit user agents, and create new user agents in the list.
Cancel closes the menu and does nothing
MiniWeb provides shortcut keys to make operation easier, and largely independent or mouse or other pointing devices. This can be very useful for some environments. Note however that all these functions are accessible from the menus, and by mouse or other pointing device.
While you are editing an existing or new user agent record, these shortcut keys also work:
MiniWeb contains a built-in list of user agents. It will also read a list from a file in a standard location, if that file exists. Normally the file is called ".miniweb_agents.xml" in the user’s home directory.
MiniWeb saves the agent list file when it exits.
Note that if you remove the agent list file, or if you move it from the standard location, MiniWeb will not find it the next time it runs. It will therefore revert to the built-in list.
The agent list is in a custom XML format, that looks like this:
<?xml version='1.0' encoding='utf-8'?> <useragentfile version="1.0" > <Agent name="Max" > <useragentstring>Maxwell Smart</useragentstring> <size high="600" wide="800" /> </Agent> </useragentfile>
The useragentstring entry is what is presented to the website. Copy this from your favourit browser.
Many user agent strings can be found on the web of course. If you want to find out the string from a particular phone, make a web page like this
<html> <head> </head> <body> <?php phpinfo(); ?> </body> </html>
and see what it says in the Apache Environment under HTTP_USER_AGENT when you surf to that page from the phone.
MiniWeb does not emulate any phone browsers. It uses the standard browser provided by the Qt WebKit framework. The only aspects of phone browsers, or of any other user agents, are the user agent string presented to the website, and the screen size provided. Consequently there is no guarantee that what you see on MiniWeb looks anything like what you see on a phone, even if you use the identical user agent string and screen size.
MiniWeb can be built from the command line in Linux, or from the Qt Creator tool in Windows. It can probably be build quite easily on Mac OS-X as well, or on anything else that is compatible with Qt 4x. Try it for your favourite phone, it will probably work.
To build and run MiniWeb, the current version uses:
C++
Gcc or Visual C++
Qt4, including these parts:
Core
Gui
Network
Xml
WebKit
It’s pretty straightforward. Please read the INSTALL file that comes with the source code.
This is free open source software, hence the usual licensing. And the usual warranty, or lack thereof:
Copyright © 2010 Bernd Stramm All Rights Reserved