I built my Unity on HTML5 WebGL and this error message shows up when I try to launch it - html

Unable to parse Build/Pain.framework.js.br! Loading pre-compressed (brotli or gzip) content via a file:// URL without a web server is not supported by this browser. Please use a local development web server to host compressed Unity content, or use the Unity Build and Run option.
Monopoly A3

The message is pretty self-explanatory: you'll need a local server to do that. They're countless ways to do that but here's one of them:
XAMPP
Just download it and run it (The XAMPP Control Panel - Apache -> Start). Then put your files in C:\xampp\htdocs\ (On Windows, not sure for other systems).
C:\xampp\htdocs\ Will be the equivalent of http://localhost in your browser, so if you put example.txt in C:\xampp\htdocs\, it will be available at http://localhost/example.txt.
Other options
XAMPP is my personal favorite, but they're other options, like the other *AMP, like WAMP, MAMP and LAMP, for Windows, MacOS, and Linux respectively (XAMPP being multiplatform - Also more exist is you're curious).
They're also "simpler" solution (in the sense of more lightweight ones) like http-server for NodeJS, or Python's http.server. But they need to be executed on the right folder each time. Both solutions works fine so it's up to you to choose your preferred.

Related

Setting cookies to chrome running in headless mode

I am planning to use chrome.exe to take a png snapshot of a web page.
The web page has references to js files that are served by an application server. Application server needs session cookies to authrize and server the pages.
I could not find any options to pass cookies to chrome.ext.
I have searched in google, but most suggestions are pointing to use selenium web driver. Making use of selenium web driver for chrome is making me choose compatible versions only. I have to frequently update the driver if the chrome version changes. It is not acceptable for my use case.
Executing the command mentioned below using java process builder.
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe " -headless -hide-scrollbars -disable-gpu -screenshot=C:\Users\abc\Desktop\tmp\file1.png C:/Users/abc/test.html
I need a way to pass cookies without using any third party libraries (webdriver, puppeteer etc..)

Is it possible to run polymer locally?

Might be a very stupid question, but right now I'm running a project using Polymer-Project elements on a remote server.
I'm going to be away from network for a while, but I still want to work on this project offline. However, I can't get it running locally on a windows machine, even though all the dependencies are CSS/HTML/JS. Is there something I'm missing? All the paths are relative, and I double-checked them just in case.
Yes, it's possible.
You only need to have a web server running on your computer, as Polymer pages must be served from a web server.
Apache, ISS, Nginx or other HTTP servers will work; If you have no server in your computer, you need to follow the instructions in https://www.polymer-project.org/docs/start/tutorial/intro.html to start a quick Pyhton HTTP server.
Yes it is possible. You just need a local web server.
For Mac/Linux,
Python comes generally pre-installed. Hence, you can directly start a web server from any directory using,
python -m SimpleHTTPServer
If python is not available, then you can install MAMP for Mac and XAMPP for Linux system to start a local web server.
For Windows,
You've got WAMP that does the same thing for windows.
For a lightweight static web server, you could use Mongoose that runs on all three platforms mentioned above.

Building a web page without having internet access

I want to build a web site using my laptop in areas where I often do not have internet access - no active browser. How do I check my pages to see how things are going without a browser?
Just drag-and-drop the .html file into your favourite web-browser. It should open up with the "file:///" protocol automatically.
You should always have a local web server installed on your machine for development.
For example, Mac OSX comes with Apache pre-installed. You might have to activate it. You can also install a server language like PHP or Python. Again, OSX comes with those pre-installed, might just need activation. Google how to set up a local server on the type of OS you have.
You should try to replicate the type of server setup you will be using in production.
That will permit you to code locally and test in your browser.
You should also use some kind of versioning system like Git. So, you code on your local machine, then you can push your code to the cloud once in a while for backup. When you're ready, upload your code to the production server and try it out.

Looking for a (httpd like) way/server to access static files (html/images etc) from my windows pc using http

I have a static html project which contains some files I want to have access to using my cell phones or laptop's internet browser.
The concept is I have a folder in my pc which contains the files.
I would hit my computer's IP through the web browser of my laptop
(like http://192.168.1.5/myProject/index.html)
and then a server (like apache httpd works for redirecting to servers) would return me the wanted file.
NOTES:
-It should be EASY and FAST to install and Configure.
Any suggestions? Most acceptable answers are for Windows and then I accept for mac!
Have you tried xampp for an apache server? There is a portable app version as well.
Also iisexpress is a nice standalone version of IIS that runs under current user profile. Not sure if there are any limitations w the bindings tho.

Using SSI (Server Side Includes)

I'm trying to learn how to do Server Side Includes because I need them for a project of mine. Now, can I use SSI locally? My site is 100% HTML, Javascript, and CSS, so there is no server running my stuff. I'm just editing the files in notepad. What can I do to allow me to work on SSI before I upload it to the server that I plan on sending it to.
What can I do to allow me to work on SSI before I upload it to the server...?
If you're not running a server, then you can't use server-side includes. The clue is in the name. So if you're testing the page locally without a server, then your SSIs won't work.
The only way you're going to be able to do this is to install a web server on your local PC.
Fortunately this is fairly easy. The two major web servers are Apache and IIS. Apache is free; you can download it and install it for free. IIS is a commercial product (by Microsoft), but there is a cut-down version you can install for free. Pick whichever one is best for you (ie the one which matches your actual web server), and you should be able to get your SSI code working. You'll probably need to do some config to set it up, but as a web developer that's a good thing to know how to do.
You need to run a server locally to make ssi work. You can install just apache, or use XAMPP (lite) to also get PHP and MySQL.
Server Side Includes (SSI) are an optional feature of the web servers helping the developers to include HTML file content from a base file into multiple other HTML files with a single line of code. We need this if we are creating a simple, elegant and fast pure HTML site, without active server computing, just invoking content delivery capabilities of the server.
There are 3 major steps required to get SSI running on IIS 7 and later:
Configure IIS roles,
Extend IIS handlers,
Invoke a SSI call in you HTML code.
HERE is a more detailed explanation.