-
Notifications
You must be signed in to change notification settings - Fork 456
Multi browser & Multi device Testing with Page Follow
The PHP version of Pattern Lab's Page Follow feature gives developers the ability to have one browser control other browsers that connect to the Pattern Lab website. When a browser first connects to the Pattern Lab website they'll be redirected to the last visited pattern. Navigating to a new pattern will update all connected browsers. This should be especially useful when testing patterns across multiple devices.
To start the service on Mac OS X you can do the following:
- Open
scripts/
- Double-click
startPageFollowServer.command
- Refresh the Pattern Lab site
You can also start the service from the command line. To do so open Terminal and navigate to the root of the patternlab-php directory. Type:
php listeners/navSyncBroadcasterServer.php
Your browser should now be listening for Page Follow events and the Pattern Lab toolbar should note that "Page Follow" is now "On." Any other browser that visits the Pattern Lab site should now be redirected to the last visited pattern. When one browser views another pattern they should all be updated.
To stop the service on Mac OS X you can press CTRL+C in the Terminal window where the process is running.
If you want to view patterns on your mobile device do the following:
- Make sure your mobile device and computer are on the same WiFi network
- Note the IP address for your computer. On Mac OS X this is found under System Preferences > Sharing.
- Replace the star with your IP address in the following address:
patternlab.*.xip.io
- Enter that into the browser on your mobile device
The directions above assume that your Apache VirtualHost
has patternlab.*.xip.io
(with the star, not your IP address) as a ServerAlias
.
Important: If you find that page follow is not working properly please make sure your browser supports WebSockets.