Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by frankosport19

  1. Discovered the JavaScript-powered HTML include process here at W3 Schools almost two years ago, and it has worked very well for me. I've tested the code in Firefox, Pale Moon, Opera, Chrome and MS-Edge (Windows versions only), and it hasn't failed in any of those yet.  Be aware that your desktop, laptop or notebook must have a local server running so that you can see the code working as desired  before you publish your content. Currently, I am using the Laragon Apache Server.

    A modest sample of how I have used the JS-HTML include -- Calendar for the Year 2021. In examining the source code, be sure to note the remarks I have inserted at vital places. BTW -- The reference to the XAMPP local server can be ignored, as you may be using that you like better.

    BTW -- I've programmed with HTML, CSS, and Javascript but have never used PHP.

    Thanx-A-Lot. Stay Safe and Well.


  2. Greetings ....

    With regards to the following two javascript protocols  (in larger bold letters) ...

    »»   <a href="javascript: void(0)" onclick="location.href='somesite.worldwideweb'">somesite</a>

    »» document.write("<a href="somesite.worldwideweb">somesite</a>");

    ... my question is what effect do either of these have on web-crawler robots from the likes of Google, Bing or archive-dot-org's Wayback Machine ?? Do either or both of  these  keep a crawler from recording and following the particular link or not ??

    Regarding pages that automatically re-direct to other pages using Javascript, would these also be crawler deterrents ?? FYI - I currently use a Javascript that erases mention of the re-directing page from a web-browser's history.

    I should point out that I am already aware of other web-crawler deterrent methods, such as "disallow" in robots.txt; the META tags noindex, nofollow; non-publicly accessible pages; password-protected pages and folders.

    Thanx-A-Lot. Stay Safe and Well.

  3. 15 minutes ago, Ingolme said:

    You can use CSS to make the <div> elements behave as inline elements. Being an inline element, <span> is not permitted to contain bock elements such as <div>, so the best option is to use a <div> and use CSS to make it behave like a <span>.

    Fair Enough -- If you can please provide a demo of that, or else provide a link to a demo (simple one, if possibel) I will appreciate it.

  4. Greetings ....

    This is in regards to the W3 Demo Page "How to Include HTML"

    Take special note of the "Include The HTML" section, where the DIV tags are used in the example. I experimented with that successfully but noted one issue.

    If you use the DIV tags to include a secondary HTML file within the main HTML file, the resulting on-screen output will appear by itself on its own separate line. If you are desiring for something to be displayed on the same line along with other items,, be it at the start of the line, the end of the line, or anywhere in-between, the SPAN tags should be used in place of DIV. You of course will take care that the included HTML file does not contain BR's, HR's or any other line-breaking code that could upset the display of the particular line of items.

    Thanx-A-Lot and Much Appreciation

  5. Greetings Once Again @Ingolme

    RE IFRAMES ----

    True, so workarounds for the sake of the searches would be probably be employed, if they were so desired. However, as I stated above, not everything on the web-site has to be indexed for a search, if that is the desire of the site builder. In many cases including my own, as long as the search engine can find the parent page, which should have appropriate navigation means for any content incorporated therein, then that should be good enough.

    Thanx-A-Lot and Much Appreciation.


  6. Greetings @Ingolme

    Thank you for your input.

     Actually, I've been moving away from using javascript-html includes, and instead employing alternative methods where common format text descriptions and URL links must appear on several pages. Sometimes if IFRAME is involved,  you can use a javascript file in conjunction with an  IFRAME'd HTML file to establish a common IFRAME area on many pages, the obvious benefit being that the only IFRAME settings you have to edit are those within the single JS file. And I do take great care with the target settings of any links within any IFRAME's HTML, as well as with frame height and width.

    RE Search engines and keywords on them -- I was long aware of Javascript's negative impact on web-searches, so I've taken great care that important keywords are placed where the engines can find them. Of course, not every page on a web-site will be part of a web-search. Indeed, there will be pages that you may prefer not be found at all. Fair enough -- I have many pages that are labeled "no index/follow", or else require security entrance with a usename and password. Any folders on my site containing only javascript, PDF, CSS, image or other-non HTML files can't be publicly accessed, and each such folder has an re-direction index.html file.

    Finally, after seeing your mention of local AJAX requests, I did a new web-search and found a web-page that explains -- with proper warning -- how to allow local AJAX requests on Firefox and Chrome browsers. LINK: Browser Settings-Local AJAX Calls

    Thanx-A-Lot and Much Appreciation

  7. Greetings ....

    I have been a user of javascript-html includes for a few years, and up to this point had been using scripts from other web-locales. It is only very recently that I have decided to give the W3 Schools Javascript-Html Includes Script a try. The tries have been very favorable, so now I am going to adopt the W3-script for use on my personal web-site.

    There are,  however, some problems with testing the includes on my desktop or laptop PC's, both of which are currently using Win-7 64-bit Home Premium, and both which have Firefox, Chrome, Opera and Pale Moon browsers (they also have MS-Internet Explorer, but I do not ever use that). There is no local server app on either PC, and I've never even considered trying one out. In other words, I'm the rawest of raw greenhorns concerning server apps.

    Up until recently, I could test Javascript-html includes directly on my PC's in all the browsers without a hitch. But now, something has happened where the Firefox, Chrome and Opera   browsers won't let the includes run locally. The files have to be uploaded to the web-site for tests, and that consumes valuable work time since it may sometimes take a while for uploads to be recognized..

    At present, only the Pale Moon browser allows me to test the includes directly on the PC's, but who knows how long that may last !!

    So, I have come to this forum seeking guidance and solutions for this particular problem. Whether it's a browser config tweak, an add-on browser app or the simplest no-fuss local server method, I'll accept whatever works best. If instructions come with the solution, please keep them as simple and right to the point as possible.

    Thanx-A-Lot and Much Appreciation

  • Create New...