I know this has been asked many times, but I can't find an answer that works.
I'm making a site (https://tallerthanshort.github.io/bottom.gg) and it won't load any of the js (some reactjs) or css.
All the files can be found on the Github repo (https://github.com/TallerThanShort/bottom.gg) and all of it works when running the site locally (either by simply opening the html file or running a local server), but the GitHub pages site simply returns a 404 for every file.
I have changed all of my script tags so they have an opening and closing tag, and also removed the initial / from /_next/ so that Github pages doesn't look at the wrong repo, but it still hasn't fixed my issue.
Any help would be largely appreciated.
Edit: I found that having all the files in the same location as the root html file works, but I want to link separate folders and separate files to make things neater.
Related
We received a simple app from an over-seas developer. This application runs on a subdomain:
IE: https://balance-sheet.clientdomain.com/
We have access to the files, but when we try and move the files into a subdirectory:
IE: https://www.clientdomain.com/balance-sheet/
Then the application does not run any more.
We have tried to edit several of the javascript files to reference the new location to address the errors that were being produced. However even after the errors were fixed the app still does not run.
I have lots of dev experience, but none with the React JS stuff. Do we need original files to re-deploy? Is it possible to edit the current files to make this work?
This project is so simple, it is a basic balance sheet for training purposes.
Below is a screenshot of the app and then the file-system.
Should I provide any links or files of the actual project?
I'm really just first trying to get a feel for the options here...
Thanks all!
Add <base href="/subdir/"> in the head section of index.html and change subdir to your sub directory name. Please refer this link
Good afternoon
I am keen to explore the benefits of Fine Uploader. http://fineuploader.com/demos.html
Sadly I haven't got very far with the installation. As a novice learning JS I have some inherent weaknesses - so I thought I would start with getting the Fine Uploader 'gallery.html' template working.
So I have downloaded the plug in from GITHUB https://github.com/FineUploader/fine-uploader , extracted all the zipped files and exported them under a folder located in my root. I then located gallery.html (which is buried in the path domain/fine-uploader-master/client/html/templates/gallery.html) and loaded it into my browser expecting to see the demo version of gallery.html work. But all I get is a blank page. Looking inside the gallery.html I have tried changing the paths to fine-uploader-gallery.css and added the file fine-uploader.js to the directory. Still no joy.
I know I am doing something really silly here. If anyone can help me just get this template file running from the downloaded folder (as above) of what looks like a great plug in I would be so grateful. Thank you.
We have a Sitecore installation, and in our environment we are seeing 404 errors when our site is requesting the following files:
sptier0.js
sptier0-ajax.js
sptier0-window.js
My Google-fu doesn't turn up much.
What are these files, and what in their purpose?
Thanks!
I have found that these scripts are most probably related to SharePath performance monitoring tool of Correlsense (http://www.correlsense.com/product/).
I would start the investigation from viewing the html source in a browser, finding the place where the scripts are injected and then analyzing the sources in this area to find how does these links appear on the page.
These JavaScript files are indeed part of SharePath.
Specifically, they are added to existing application HTML pages in order to measure and report browser timing.
Your question, in addition to your comment to Vadim Dubovitsky, suggest that the tool was not properly uninstalled - the files were deleted, but they are still being referenced by (or injected into) the application code.
Disclaimer: I work at Correlsense.
I'm using Primefaces 5.1. When I load my web page, go into the Firefox debugger and look into the javascript, I see that it has loaded some javascript (Primefaces.js.jsf to be precise) which is part of Primefaces 5.0 version. Now, I have taken care to delete all the references of 5.0. But still I get the same result.
So, my question is- when a web page is loaded, and we see the javascript files loaded, how do we know where a particular script file is being retrieved from?
P.S: I'm not the one who wrote the code to include this js. it is part of the framework. So, I have no control over where it is being accessed from. All I can do is if I know the path of the file, I can modify it to suit my needs.
I have deleted the history/cache/Temporary files and also loaded the page using Ctrl + F5. Didnt help.
Found out why the project was still referring to PF5.0. The primefaces-5.0.jar still co-existed with primefaces-5.1.jar in the WEB-INF/lib directory of the project residing in the glassfish directory 'glassfish3\glassfish\domains\domain1\eclipseApps'.
I need to regularly send html pages to a client as standalone .html files with no external dependencies. The original pages are done with node.js and express and they contains several librairies such as High Charts.
I have done the preparation manually until now, this includes:
Transform all images into blobs
Copy all external .js and .cs inside the page
Minimize where possible (standards librairies such as jQuery or Bootstrap...)
The result is a single .html file that can be opened without an internet connection and looks just like the original.
Is there any tool to do this automatically? If not, maybe I'll code it myself in Python. Do you have any recommendation around that?
Thanks
Monolith is a CLI tool for saving complete web pages as a single HTML file
See https://github.com/Y2Z/monolith
With apologies to OP, as this answer is probably far too late for him, but I'm posting it to help anyone with a similar problem:
HTTrack is an open-source project that does almost exactly what you described, though it doesn't work perfectly on some of the more peculiar JS.
It saves the page with most of the JS, the major images, and everything that the page needs to appear complete. It can be configured to include or exclude the entire or partial JS, images, and CSS.
This does not import all of the JS and other content into the HTML file, but neatly organizes all of the content into one folder and corrects all of the paths to make the folder portable.
It also seems to have trouble grabbing some external sources that are protected, but if it is your local site and simply uses common scripts like JQuery, you should be fine. When I tested it, it correctly downloaded all of my local CSS and any valid external CSS library that I incorporated, the JQuery and derivative scripts that I was using, and the embedded images.
Just to save everyone a question, the program by default saves the downloaded websites to C:\My Web Sites.