What can I do to get a test a HTML5 web site from my pc? - html

I downloaded the web site below using Firefox - then launched it on chrome - while it launches fine, it is not functional. Meaning the link below, will seek microphone permission and then actually record your voice - none are happening when I launch the way I did - what might be the fix? Is there a tool available or a workaround?
http://webaudiodemos.appspot.com/AudioRecorder/index.html
Update:
What I wanted was - is to make the two boxes small and move it to the bottom of the display - I was able to make it small but they are on the top right hand corner - how can I bring it down?

If the page includes scripts such as jQuery, you would need to use CDN's for those in order for them to work.
You can see in your developer console what is not being loaded by pressing f12 or right click >> inspect element.

It needs to be accessed as http:// since file:// does not get access to the microphone. The Apache server running on a directory on a localhost machine is the way to go.

Related

The google translator icon disappears from my address bar when I load my website

I need to be able to translate my web application into another language. I enabled the google translate extension in chrome. When I load my company website with chrome the translate icon appears and I can translate the site. I then loaded my secure web application in chrome and the translate icon disappeared. My knowledge on how the translator works with web pages in minimal at best. Any help would be appreciated as I do not know where to begin. Any links to helpful articles on how the translator does its job would also be appreciated
I also had a problem with the google translate (gt) icon disappearing from the right side of the Chrome address bar. I believe I caused the problem myself as I was trying to come up with a way to use it to switch languages quickly using Keyboard Maestro.
I keep 2 Chrome windows open with 2 different gmail accounts, and the gt icon was only missing from one of the windows. I tried many things and couldn't get the gt icon to come back.
Eventually, I was able to fix the problem based on the procedure described on this page, which suggests going to this address: chrome://settings/languages to make sure the Offer to translate pages that aren't in a language you read option is on in the Languages section, as shown in this image:
In my case, the option was already set to on. So I turned it off, logged out of the account associated with that Chrome window, closed that browser window, and when I opened a fresh browser window for that gmail account the gt icon was back.
I'm using Chrome Version 96.0.4664.93 on a MacAir (M1, 2020) running MacOS 12.0.1

How can the Chrome Settings page be opened through a hyperlink?

I am building an app that requires the user to change a Chrome setting. It will be more convenient to send the user directly to chrome://settings instead of having them open it manually via the menu, but when I try and open it directly or through a hyperlink on a web page, it always goes to about:blank#blocked. I have tried this on Windows, MacOS, and ChromeOS (including through a link in a TextView in an Android app), but the result is the same. Is this possible, or is it completely blocked for security or some other purpose?
i'll save you the trouble and let you know its not possible, and yes you're right due to security reasons
For Chrome on my local machine chrome://settings/ works. Well surely not impossible but still not that easy maybe this helps
https://support.google.com/chrome/a/thread/11564174?hl=en

How to clear cache in Qlik Sense desktop?

I've been debugging a button extension issue for a button that does not work on only a few user's local machines. Over the past couple of days, I've narrowed the problem to the user's cache. With that, the bug is easily replicable.
Clearing the cache and loading the Qlik app in Google Chrome at localhost:4848/hub, the app's buttons will work. However, the app will continue to not work in the Qlik Sense desktop application itself. Because Qlik Sense is a skin over Chromium, I figured a simple reset of its cache will fix the bug for the few users that are experiencing this. Unfortunately, I'm unable to find a solution specifically for Qlik Sense via both Google and the Qlik Community Forums.
Is clearing the cache in the desktop application possible? If so, how do I go about it?
Scouring the Community Forums and Google, it appears a GUI interface to clear cache once existed, but now doesn't. If so, was it deprecated?
Thank y'all!
Since Chrome is involved then the default shortcuts will work. The shortcut below will reload the page ignoring the cache
This is from Google's support page (Web page shortcut section)
If you want to be more "brutal" :) you can manually delete the content you don't want through the Chrome Dev tools:
on the page, in QS Desktop, with the dashboard press Ctrl + Shift + Mouse right click
this should bring the context menu
select Show DevTools
navigate to Resources tab
expand Session Storage
you should see only one item http://localhost:4848. Click it
on the right side you will see all entries in Key <-> Value format (probably you have only one)
right-click on it and press Delete
refresh the page (F5)

How can I force a hard reload in Chrome for Android

In Chrome for desktop I have options in the dev tools to disable cache completely when dev tools are opened and I have the options to manually do a hard reload when long clicking on the reload button (with dev tools open).
Is there any such technique for Chrome for Android? I didn't find any setting.
What can I do when I want to force the browser to download some javascript or css file instead of using a cached one when developing?
I'm using window.location.reload(true) according to MDN (and this similar question) it forces page to reload from server.
You can execute this code in the browser by typing javascript:location.reload(true) in the address bar.
Viewing the page in incognito mode will disable the cache. It was the only way I could force a refresh on a stylesheet without manually clearing the cache through the settings.
Also an option:
Menu
Settings
Privacy
Clear Browsing Data
Check "Cache" and press "CLEAR"
and then reload the page.
You can use the Request Desktop Site option from the app menu (to the right of the address bar) which will force the page to reload.
Simply tap it, wait for the refresh, then deselect it.
Mentioning this because you mentioned "when developing".
You can control the mobile device via your Chrome Desktop Browser.
Visit chrome://inspect/#devices on your desktop. And Inspect the device that's connected to your desktop. Agree when asked for permission.
You should now see a full fledged Devtool window for the current page on mobile device.
Now, Use the hard reload shortcut (Cmd+Shift+R) on desktop to do hard reload on mobile device!
How to reset all data for a given URL / Website on Chrome Mobile for android:
1 - Open the Chrome menu, and tap on the "i (info)" icon
2 - tap "Site settings"
3 - Tap the trashcan icon
That's it, even the most deeply ensconsed service worker for that URL will now die.
Don't forget to make sure that the "Reduce data usage" setting is turned OFF, as it seems to download cached data (from Google servers?) even though your local cache is flushed.
I know this is an old question, but I found that the accepted answer didn't work for me.
An alternate solution would be to append the url with a new url parameter
such as website.com?a=1, website.com?a=2, etc.
If you have parameters already, of course, you would use an ampersand
i.e. website.com?q=test&a=1
As of 2018, from google help center (tested on Chrome 63) :
tap on the three dots menu ;
choose History > Clear browsing data ;
if needed, choose the time period (above the checklist) ;
uncheck all items but Cached images and files ;
proceed with Clear data and confirm.
As mentioned in another answer, incognito tabs are also of great use for development.
I found a solution that works, but it's ugly.
Connect the Android device to your PC with a USB cable and open Chrome on your desktop.
Right-click anywhere on a page and select "Inspect".
Click the three-dot menu and select "Remote devices" under the "More tools" menu:
In the panel that opens, select your device and then the "Inspect" button next to the name of the tab on your phone that needs to be refreshed:
In the window that opens, click the "Network" tab and check the "Disable cache" checkbox:
Reload the page on your phone or using the reload button in the DevTools window.
Note: if your phone doesn't appear in the device list:
make sure the USB connection is using File Transfer mode and isn't simply charging
try restarting ADB or run adb devices to see if the device is being detected
The only reliable way I've found that doesn't require plugging the phone in to a PC is as follows:
1. Force stop the Chrome app.
This must be done first, and you cannot re-open Chrome until you finish these steps. There are several ways to force stop. Most home launchers will let you get to "App info" by holding down your finger on the chrome icon and selecting an "i" icon. Alternately, you may be able to go to Android settings and simply search for "Chrome".
Once in "App info", select "Force stop" as shown below:
2. Clear Chrome's cache
Select "Storage" from the same screen:
Finally, select "Clear cache".
When you return to the Chrome app, the page should reload itself and serve a non-cached version.
Additionally, I found a site that makes it easy to test if you've cleared your cache: https://refreshyourcache.com/en/cache-test/
I am in no way affiliated with it. Note that the method to clear the cache mentioned on that site is in fact outdated and no longer valid.
Keyboard shortcuts such as Ctrl+Shift+R work on Android too, you just need a keyboard capable of sending these keys. I used Hacker's Keyboard
to send Ctrl+Shift+R, which did a hard reload on my phone.
Recent versions of Chrome cache very aggressively. Even cache-busting techniques such as "http://url?updated=datecode" stopped working. You must clear the cache or launch an incognito window every time (and make sure data-saver is off).
Remote Debugging allows you to use the desktop dev-tools:
https://developers.google.com/chrome-developer-tools/docs/remote-debugging
If its just the matter of included files, just add version after the path (?v=12345678)
<link rel="stylesheet" type="text/css" href="style.css?v=12345678" />
Whoever loads the page again will see changes.
Most of the answers were not working for me.
Here is a super simple working on my Galaxy S8 in august 2020:
Add "view-source:" just before your http:.... address, navigate trough there to the changed file if different than the html or index.
You will see the unchanged file. Refresh.
Done.
EDIT: This method has been deprecated in Google Chrome and will no longer work.
ORIGINAL ANSWER:
I was able to clear the cache (including subsequent xhr) using chrome://net-internals
Then click the little arrow in the top right
Select "clear cache" from that menu.
Here is another simple solution that may work when others fail:
Today, a fairly simple developer-side solution worked for me when the caching problem was a cached CSS file. In short: Create a temporary html file copy and browse to it to update the CSS cache.
This trick can refresh the CSS file, at least in Android's blue-globe-iconed default browser (but quite likely its twin, the official Chrome browser, too, and whatever other browsers we encounter on "smart"phones with their trend of aggressive caching).
Details:
At first I tried some of the fairly simple solutions shared here, but without success (for example clearing the recent history of the specific site, but not months and months of it). My latest CSS would however not be applied apon refresh. And that even though I had already employed the version-number-trick in the CSS file-call in the head section of the html which had helped me avoid these pesky aggressive cachings in the past. (example: link rel="stylesheet" href="style.css?v=001" where you upgrade this pseudo-version number every time you make a change to a CSS file, e.g. 001, 002, 003, 004... (should be done in every html file of the site))
This time (August 2019) the CSS file version number update no longer sufficed, nor did some of the simpler measures mentioned here work for me, or I couldn't even find access to some of them (on a borrowed android phone).
In the end I tried something relatively simple that finally solved the problem:
I made a copy of the site's index.html file giving it a different name (indexcopy.html), uploaded it, browsed to it on the Android device, then browsed back to the original page, refreshed it (with the refresh button left of the address bar), and voilĂ : This time the refresh of index.html finally worked.
Explanation: The latest CSS file version was now finally applied on Android when refreshing the html page in question because the cached copy of the CSS file had now been updated when the CSS file was called from a differently named temporary html page that did not exist anywhere in the browser history and that I could delete again afterwards. The aggressive caching apparently ignored the CSS URL and went instead by the HTML URL, even though it was the CSS file that needed to be updated in the cache.
Adding a parameter to url fool browser to load a new page. I wrote a fuction for that purpose:
function forceReload(){
function setUrlParams(url, key, value) {
url = url.split('?');
usp = new URLSearchParams(url[1]);
usp.set(key, value);
url[1] = usp.toString();
return url.join('?');
}
window.location.href =setUrlParams(window.location.href,'_t',Date.now());
}
And you just need to call it:
forceReload();
I've struggled with this for a CSS file that wouldn't refresh. But you can type the name of the CSS file itself into the address bar and refresh that. After that it's fine. Chrome on Android 8. Obviously that would be tiresome if you had more than a couple of files involved.
If that's an option, you can visit the (i.e. JavaScript) resource directly, reload a bunch of times, and that also triggers a hard reload for that resource. Then you can reload the actual page again.
Launch the Chrome Android app
Tap on the menu for more options.
Select Settings from the list of options.
Scroll down and tap on the Site Settings tab.
Within the Site Settings open the Data Stored tab.
Tap on the Site URL that you want to delete storage.
Hit on the Clear & reset command button.
refresh the website page.
there are few methods to force reload chrome on mobile device:
clear history (look above)
use remote debugging (look above)
request desktop site
disable "Lite mode"
open URL for .JS or .CSS then do normal reload.
In chrome,simply tick "Desktop site" and then remove tick!!

xulrunner 17.0.1 browser content links require doubleclick (instead of a single click) on Mac OSX 10.7.x

I am using xulrunner 17.0.1 to convert a web base HTML 5 application to a standalone desktop application. The target platforms are Window XP + and Mac 10.6 +.
While I am able to package and run my HTML 5 application with XULRunner on window without any trouble, I am facing a weird issue on the Mac. Everything seems to be working fine except for I have to double click (instead of single click) on a link of my HTML 5 application to make it works.
To ensure that problem is not in the HTML 5 application I opened mozilla/other websites in the browser component and found that problem is with any content.
Is there any preference setting that I need to change?
Thanks
-pk
I figured out the cause of the problem. I was running my application from Terminal and somehow the focus was always going back to the terminal window, therefore the link were working on double click only. On first click my application window was getting the focus and on second click the link was registering the click event. Similarly the text box were also not taking inputs from keyboard.
I packaged my application as an app using the guidelines provided at "https://developer.mozilla.org/en-US/docs/XULRunner/Deploying_XULRunner_1.8" and that solved all the problems. Everything started working as per expectation.