Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


lynkfs last won the day on February 4 2021

lynkfs had the most liked content!

About lynkfs

  • Rank

Profile Information

  • Gender
  • Location

Recent Profile Visitors

3,736 profile views
  1. add it to your server config if you have access to it, or register your domain in the preload hsts (https://hstspreload.appspot.com/) site, maintained by Google, or implement another strategy (301 redirect, .htaccess directive)
  2. Something like this var Script : variant := browserapi.document.createElement('script'); Script.src := '<your script statements>'; browserapi.document.head.appendChild(Script); Script.onload := procedure begin writeln('script loaded'); end; you can put <the script statements> as javascript in an asm block or alternatively pascalify them : var atOptions : variant := new JObject; atOptions.key := '000000'; etc
  3. The listbox items map to the <input type=text> html element, which are single line items (EditBox) A multi line item would have to map to say a <textarea> element (Memo) In this case you would have to roll your own listbox component, which generates html like below You can delve a bit in the SmartCl.Controls.ListBox unit to see how this component has been put together. For instance Height can be set by coding W3ListBox.ItemHeight := 60;
  4. There is no expiration date on local storage However, users can manipulate local storage themselves, or the browser can decide to purge when it needs memory, so there is no guarantee it will always exist. Local storage is also specific per protocol, so http:// and https:// point to different storage objects. Also storage in private browsing mode gets handled with specific rules. You can set an expiration yourself if necessary though
  5. I've always loved the basic data-structures as described in this link. Since I needed a double linked list the other day, I transcribed all of the major basic structures from js into object pascal : Array Hash Table Set Singly Linked List Doubly Linked List Stack Queue Tree Graph Source and test-files here
  6. https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity is probably a good starting point
  7. This looks like a non-solvable problem. Apparently Apple changes his/her mind often how to implement this in the various mobile iOS Safari versions and the OS hardware event checking seems to take precedence over html processing. If you change the <body> part of the index.html file to this <body> <script type="text/javascript"> /* This prevents the window being moved by touches, to give the impression of a native app */ document.ontouchmove = function(e) { e.preventDefault(); } document.addEventListener("touchstart", event => {window.alert("tou
  8. Got hold of an iPhone, and yes, I see the problem. Testing some possible solutions, probably tomorrow though
  9. The standard generated index.html should prevent what you're experiencing : <meta name="viewport" content="width=device-width, maximum-scale=1.0, initial-scale=1.0, user-scalable=no"/> At least on Android and iPad it does. However there have been problems reported in mobile Safari ( https://stackoverflow.com/questions/37808180/disable-viewport-zooming-ios-10-safari https://stackoverflow.com/questions/10614481/disable-double-tap-zoom-option-in-browser-on-touch-devices If your problem is indeed linked to mobile/Safari on iPhones, then you can also disable z
  10. lynkfs


    Routing is the link between specific url's and specific functionality in an app, so f.i. https://<server>/index.html starts up your app in the browser as per normal https://<server>/login executes a specific view (f.i a login form) Smart per default produces single page app's, without routing functionality There are a couple of strategies which can be followed to implement routing (and which will work to some extent) : use # formatted urls. Browsers have a 'hashchange' event built in, which fires every time a url changes,
  11. lynkfs


    Search Engine Optimisation - SEO Over the years I have made quite a few websites with Smart, but eventually stopped doing that. Reason is that Smart produces single page applications (or multiple if you like) and SEO for these type of apps is essentially impossible. Search engine crawlers look for html, which is what feeds their indexing effort. This is completely absent in the standard index.html file, so essentially they see an empty page. Google's googlebot is supposed to be able to execute the js bit during its crawling, but I find the indexing results below par. The
  12. Apparently the signature of the promise.then function (executor function) in the compiled js file needs to be exactly like this : promise.then(function () { //console.log('success'); }, function () { //console.log('error'); }) As long as the compiler ejects this structure, it works fine Probably other team members could shed some more light on this ?
  • Create New...