The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,512 other followers

Archive for the ‘Web Development’ Category

GitHub – sdsalyer/gplus-archiver: A tool for exporting content from Google+

Posted by jpluimers on 2019/02/27

[WayBack] GitHub – sdsalyer/gplus-archiver: A tool for exporting content from Google+

Example saves: [WayBack] gplus-archiver

Via:

–jeroen

Posted in Development, G+: GooglePlus, PHP, Power User, Scripting, SocialMedia, Software Development, Web Development | Leave a Comment »

CDATA inside JavaScript or style section of HTML? They are for backward compatibility. Sometimes compatibility with ancient browsers.

Posted by jpluimers on 2019/01/23

As a back-end person, sometimes I wondered about CDATA in front-end HTML code was for, especially in JavaScript and CSS style elements.

[WayBackHTML vs. XHTML – WHATWG Wiki explains how to be compatible with XHTML, HTML, XML based tools and older browsers:

The following code with escaping can ensure script and style elements will work in both XHTML and HTML, including older browsers.

In both cases, XML ignores the first comment and then uses the CDATA section to avoid the need for escaping special characters < and & within the rest of the contents (with subsequent JavaScript comments added within to ensure the HTML-oriented code is ignored by JavaScript).

In HTML, older browsers might display the content without the content being within a comment, so comments are used to hide this from them (while modern HTML browsers will run code inside the comments). The subsequent JavaScript comment is added to negate the text added for the sake of XHTML.

The <style> requires the /**/ comments since CSS does not support the single line ones.

   <!---->
       ...
   //-->
   <style type="text/css"><!--/*--><![CDATA[/*><!--*/
       ...
   /*]]>*/--></style>

If not concerned about much older browsers (from which one is hiding the HTML) one can use the simpler:

   //
   <style>/*<![CDATA[*/
   
   /*]]>*/</style>

Also note that the sequence “]]>” is not allowed within a CDATA section, so it cannot be used in true XHTML-embedded JavaScript without escaping.

–jeroen

via:

Posted in CSS, Development, HTML, HTML5, JavaScript/ECMAScript, Scripting, Software Development, Web Development | Leave a Comment »

some links that helped me fiddle with iframe elements

Posted by jpluimers on 2019/01/16

I need to document this properly later, but here are some links I used when fiddling with iframe elements:

A few things I learned:

  • You can either put the iframe elements in different divs then arrange the divs, or put a different ID on each iframe and arrange the iframe. In either case you will need a float: left; in your style and a width: 100vw in the div around all your frames.
  • Be aware that 100% isn’t 100% out of the box: default browser styles have a margin around your page and a border around an iframe.
    So you will need to fiddle with margin and border-width inside your styles for body and iframe. Easiest is to set them to none or 0.
  • Viewport width/height works easier for me than raw %.
  • For one-off situations, I like the good old meta refresh over fiddling with JavaScript.

–jeroen

Posted in CSS, Development, HTML, Web Development | Leave a Comment »

UptimeRobot is written in PHP and runs on IIS

Posted by jpluimers on 2018/11/28

In [WayBackJeroen Pluimers‏ @jpluimers: Every now and then editing @uptimerobot entries failed. Just “HTTP Error 503.4 – Service Unavailable The FastCGI pool queue is full” 1/2 I found out that UptimeRobot:

There is also a maintenance page at uptimerobot.com/maintenance.php#tvMode [Archive.is] and uptimerobot.com/maintenance.php?c-e [Archive.is]. If you get to those, then retry in ~10 minutes as sometimes it takes that long for an update to be processed.

Sometimes setting up multiple Android devices for the same uptimerobot account can be a bit of a hassle: [WayBack] Uptime Robot on Twitter: “Once logged in to the account from another Andriod device, that device will be added as an alert contact too.… “.

All in all it is still a nice tool (:

–jeroen

Read the rest of this entry »

Posted in *nix, Development, IIS, Monitoring, PHP, Power User, Scripting, Software Development, Uptimerobot, Web Development | Leave a Comment »

Load testing a web server on Windows using the ApacheBench benchmark tool from Apache

Posted by jpluimers on 2018/11/08

Based on:

  1. Download the most recent x64 Apache binaries for Windows from [WayBackApache VC15 binaries and modules download (at the time of writing: https://www.apachelounge.com/download/VC15/binaries/httpd-2.4.34-win64-VC15.zip )
  2. Extract recursively to D:\bin
  3. Run the UltrawareController locally
  4. Run D:\bin\httpd-2.4.34-win64-VC15\Apache24\bin\ab.exe -n 1000 -c 10 http://localhost:8000/foo

This will run the ab Apache benchmark tool with 1000 connections using 10 threads all doing the same http GET request at http://localhost:8000/foo

If you want to test TLS (https) connections, then you need to use the abs tool in the same directory as the ab tool supports http-only (when you still try, you get the message SSL not compiled in; no https support as explained in [WayBack] Add https support to Apache Bench on Windows – Stack Overflow).

Download location via [WayBack] windows – Is there any link to download ab Apache benchmark – Stack Overflow:

There are many more command-line parameters documented at [WayBack] ab – Apache HTTP server benchmarking tool – Apache HTTP Server Version 2.4, this is the summary:

Synopsis

ab [ -A auth-username:password ] [ -b windowsize ] [ -B local-address ] [ -c concurrency ] [ -Ccookie-name=value ] [ -d ] [ -e csv-file ] [ -f protocol ] [ -g gnuplot-file ] [ -h ] [ -Hcustom-header ] [ -i ] [ -k ] [ -l ] [ -m HTTP-method ] [ -n requests ] [ -p POST-file ] [ -Pproxy-auth-username:password ] [ -q ] [ -r ] [ -s timeout ] [ -S ] [ -t timelimit ] [ -Tcontent-type ] [ -u PUT-file ] [ -v verbosity] [ -V ] [ -w ] [ -x <table>-attributes ] [ -Xproxy[:port] ] [ -y <tr>-attributes ] [ -z <td>-attributes ] [ -Z ciphersuite ] [http[s]://]hostname[:port]/path

Via: [WayBack] apache – ab load testing – Stack Overflow

jeroen

Posted in Communications Development, Development, HTML, HTTP, Internet protocol suite, Software Development, Web Development | Leave a Comment »

 
%d bloggers like this: