Java script not running on webbrowser in WP8 HTML app - webbrowser-control

I am developing the WP HTML5 app. I've set of HTMLs, js and css created for it.
The IsScriptEnabled flag is set to true, before I Navigate to the HTML page added as project asset.
The js is not getting executed from the index.html page, I am navigating to. When trued, the same js execution is happening properly on iOS and Android.
What can be the possible reasons for the same.
Anything that has to be done (apart from enabling script) before navigating to the page? Please help!

The IsScriptEnabled flag does not enable/disable JS, but it enables JS to call out to the app and vice versa.
So, I assume you have some JS in the OnLoad of the page you are navigating to. If you replace your code with a simple document.writeLine("test"), does that work? If it does work I'd assume that IE's JS engine is (once again) not compliant.
You could also listen to window.onError

Related

How to allow direct access from browser to a `page` contained in a SPA on a chrome extension?

I have been working on a chrome extension using vue 3, vue-router and vue-x.
The extension is a Single Page Application, so if I understand correctly, it means that all incoming traffic should go through a root page and then vue-router handles the rendering while giving the user the impression that he changed page when in reality, he did not.
According to this part of vue-router documentation, you normally need something server side to make sure your root page is always served (nginx, apache, etc).
I need to reproduce this behaviour for my chrome-extension, and I have tried playing with the manifest.json but without any success so far. When I try to access to my other page, I have a File not found error. If I was to create an other-page.html, it renders but it wouldn't be a SPA anymore. I could try to put some hacky JS inside this other page but I was wondering if there was any more elegant way to handle this.
tl;dr: How to allow direct access from browser to a page contained in a SPA on a chrome extension.

How does Vue router help to load page faster?

So I just got into the topic of Vue router today. I know that it helps contents to load faster by preventing the whole page to refresh everytime but to only bring necessary components.
But didn't it just load the whole bundle.js file (by Webpack) upon visiting the home page already? So since we already loaded the whole JS file upon first visit, wouldn't it be unnecessary to call separate JS files when visiting different pages?
This is the lesson I was watching.
The main benefit you're talking about is navigating from one URL to another.
Normally, this would require a full page load, eg
Page1.html 👉 click link 👉 Page2.html
- JS - JS
- CSS - CSS
- Images - Images
but by using a component router, you only need to swap out the parts of the page that have changed without reloading all your layout.
This is really at the core of what is known as a Single-page application where your app is quite literally one HTML page with parts within it that respond to URL changes.
The URL is able to be changed without requiring a full page load by either manipulating the URI fragment (aka hash) or by using the browser's History API.
In Vue Router, this choice is controlled by the mode configuration.
"But didn't it just load the whole bundle.js file"
Not necessarily. See Lazy Loading Routes.

Does the Nuxt "Universal"-mode re-request the page from the Node server every time a new page is requested by the client?

I'm trying to figure out a basic thing about Nuxt "Universal" mode with the help of my dev tools, but I am just not sure if I understand it correctly.
Every time I request a new route in the Universal Nuxt app it seems to send a 200 (OK) request to the Node server. Did I understand correctly that on every page request a new document gets requested and served up by the Node server?
Some people are claiming that even while running the Universal mode the Node server sends only one package and after that the navigation and subsequent pages are loaded on the client side, thus not hitting the Node server anymore, but this is not the case right, how could the search engine crawler index that?
Essentially on every new route instead, the page gets re-requested from the Node server in its pre-rendered form right? This is how the "Universal" mode is actually SEO friendly as the crawler can look through all the pages and index it correctly to Google or Bing?
I'm sorry as I'm just a beginner with Nuxt and I fully understand (I think) how SPA as well as the Nuxt Generate modes work but this Universal mode is still a mystery for me at this point.
I would be very thankful for any clarifications on this!!! It would be super valuable in my learning journey! Thanks!
It's important to understand different "kinds" of navigation.
If you are navigating to a route by typing it into browser's URL bar, browser is hitting server (and this has nothing to do with Nuxt specifically) and what you get back is HTML with HTML content of your route pre-rendered by Nuxt + js bundle. Same thing happens if you use F5 (reload).
If on the other hand you use <nuxt-link> inside of some Nuxt page pointing to a different route/page and you click it, underlying Vue router will be used to switch to a different page (Vue component), server is not requested (for HTML) and new component (page) will handle rendering client side only
There can be an Ajax request when navigating that way but request is not for server-side rendered HTML. It's for additional JS content. Its because Nuxt is using automatic code-splitting (so when you hit the server 1st time, only JS needed for that route to work is loaded). Once the JS bundle for a specific route is loaded, it will not load again on subsequent navigation and unless your page/components inside are loading data from some API, you will not see any requests to a server during navigation....

Typo3 Page content not visbile in frontend

I have created an extension and added to a page when I executed page got a blank page. Then I inspected through view-source of browser the contents are there. but not visible.
The view was visible on Typo3 v7 local, but not on the server.
I'm using the Typo3 v7 and Typo3 v8.
Extension has been installed in both server versions, but not displaying.
I have included the extension into the template.
I have Checked the Debug functionality through the controller
that also didn't display on front-end, But is visible as source code
Should anything to be done more? Any idea?
Thank you
That does not sound like a problem of TYPO3 than a problem with CSS.
If the HTML markup is available at the browser but not visible the browser has decided not to show it. And that probably is CSS. Use the browser debugger (firebug, inspector, ...) to identify which CSS hides the content.
Also Javascript might interact as it could change visibility after page submit. (try to load the page with deactivated javascript)
In the end it could be an additional or missing div tag or css class that is responsible and you could configure TYPO3 to change the HTML markup in the way so that your content is not hidden.
If you have one server where the content is visible and one where it is not shown you may do a diff on a page to find the difference between these servers. The HTML could be the same if CSS and/or Javascript is different.
I would save the same page from both servers localy (with all CSS and JS) and do a tree diff with a tool like kdiff3

IBM MobileFirst - App Multipage

Good morning,
I am installing a APP with IBM MobileFirst Platform and seen in the documentation, by making an APP multi page, you should avoid the attributes href and document.location.href of javascript. I have verified that the system used is that of a single page and upload the content in div with jquery load () function.
Is strictly necessary this requirement or I can continue using href and document.location.href? I say this, because in my APP, the header and footer, change in each html page and I do not want to reload the html page with many divs, shown and hidden.
What you recommend to resolve this issue? How I can connect different html pages in MobileFirst, without using href or document.location.href?
Thank you.
Best Regards,
The reason why it is recommended to load the page contents via ajax is because MobileFirst libraries are loaded in the main html file. Loading other html files would require you to include all the MobileFirst libraries "including cordova" in every single html file of your application. Doing that will decrease the performance of your application since you will have to load all the library files for each page. It may also cause some conflicts with the objects loaded into the DOM since they may be loaded already.