Smartphone friendly website
During the the homepage adaptation for mobile it was always necessary to have the screen width in view. Therefore, the corresponding line for the width and height has been inserted in Javascript, see below.
Explanation: Textarea can be often enlarged (bottom right corner), mark the content with CTRL+A and copy to the clipboard with CTRL+C.
Then it was necessary that the values change automatically when window is changed or smartphone/tablet is rotated. To measure the page width, every second was the idea. Why not have the time with it in view?
Finally, I found this feature useful and I have also switched online (see
Sylbek bottom right). If you find it useful, you can also integrate it into your website. Below is the guide.
Javascript (showinfo.js) includes:
Time function, resource saving version
The time is from the web server, not the local device. This time is read with every click via PHP (page load). Then only seconds are counted via Javascript function until the next click. This is resource-saving variant.
The related PHP page (showinfo.php) contains: