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,567 other followers

Archive for the ‘Web Development’ Category

Firefox 29 and up: “The connection has timed out”

Posted by jpluimers on 2019/04/24

A few years ago, Firefox changed the default “network.http.response.timeout” value from zero to 300 seconds (5 minutes).

Display style systems that show refreshing web pages, this can be a problem as when the connection to the web-server is unavailable for more than 5 minutes, then the page will show “The connection has timed out” and stop refreshing.

The solution – apart from fixing each and every connection problem – is to either restore the value or make it very long:

  • network.http.response.timeout=0
  • network.http.response.timeout=30000

Changing this works similarly like in A way to skip the Firefox “Well, this is embarrassing” during a sudden reboot « The Wiert Corner – irregular stream of stuff:

  • Open Firefox
  • Type about:config in the addressbar
  • Confirm the
    This might void your warranty!
    by clicking
    I accept the risk!
  • Search for network.http.response.timeout
  • Double click it so the value changes from the default value 0 to the user set value 0

–jeroen

Via:

Posted in Development, Firefox, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

Lesson learned: do not copy/paste code from the `Visual` WordPress.com editor…

Posted by jpluimers on 2019/04/16

[WayBack] Lesson learned: do not copy/paste code from the Visual WordPress.com editor; copy from the Text editor or the Preview… – Jeroen Wiert Pluimers – Google+.

Note: likely the HTML below got rendered badly by WordPress.com, so the gist below has the same text as a MarkDown file.

Ever wonder why copy-pasting code from your WordPress.com post fails?

The first statement fails, but the second works:

[root@linux:/etc] # useradd --create-home --shell /bin/false autossh24
useradd: unrecognized option '--shell /bin/false'
...
[root@linux:/etc] # useradd --create-home --shell /bin/false autossh24
[root@linux:/etc] #

The reason is that the first is copied from the Visual WordPress.com editor that renders this HTML inserting   which is a different unicode characer (0x00A0) than a normal space (0x0020):

<blockquote><p><code data-mce-selected="1"># <strong>useradd --create-home --shell&nbsp;/bin/false autossh24</strong></code></p></blockquote>

However, the the second copied from the Text WordPress.com editor succeeds because it has all regular spaces:

<blockquote><code># <strong>useradd --create-home --shell /bin/false autossh24</strong></code></blockquote>

Luckily the Preview render is correct:

<blockquote><p><code># <strong>useradd --create-home --shell /bin/false autossh24</strong></code></p></blockquote>

Lesson learned: do not copy/paste code from the Visual WordPress.com editor; copy from the Text editor or the Preview.

–jeroen

[WayBackEver wonder why copy-pasting code from your WordPress.com post fails?

Read the rest of this entry »

Posted in Development, PHP, Scripting, SocialMedia, Software Development, Web Development, WordPress, WordPress | Leave a Comment »

debugging – Find what javascript changes the DOM? – Stack Overflow

Posted by jpluimers on 2019/04/01

I know I’m going to need this one day: [WayBackdebugging – Find what javascript changes the DOM? – Stack Overflow

Via: [WayBack] Javascript “Why”: Wenn ich eine fertig geladene Webseite sehe und wissen möchte, warum “dieses Element da” (Bild, Script, div) geladen worden ist, wie… – Kristian Köhntopp – Google+

–jeroen

Posted in Chrome, Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

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 »

 
%d bloggers like this: