how to retrieve html file shown in FireFox new tab view - html

When I open a new tab in Firefox, I see a html file that used to be on my server and I thought was lost due to overwriting. It's nowhere in my home folder. How do I get hold of it? I'm hesitating to click it because it may refresh.

Right click on the page to open a menu and then click View Source Code.

Hover over it with your mouse and see if it shows a path, or try editing to find a path to it. If this doesn't work, the best thing to do would to try clicking it and see what happens.

Goto about:cache?device=disk
Find the link and click on it.
Copy the file at the path specified in "file on disk."
If the file is gzipped rename it to zip and then unzip it.
Voila, you have your file.
You could also try about:cache?device=memory … files there are not gzipped.

Related

The right way of setting <a href=“”> when it's a local file

{{names[i]}}
This is the one I am using for giving file path in my html template.
files[i] is /Users/../../file1.txt and names[i] is file1.txt. In my webpage I am getting file1, file2 etc. And when I point my cursor to any of them, then the correct file path shows at the bottom. But when I try to click it is not redirecting to the file location. But when I copy the link address and paste it in a new tab, I am able to open the txt file. Can someone please give me a solution why this is happening.

My website project's images get uploaded with capitalized filename. Why is this happening?

so strange problem.
I finished my website and pushed the project to github.com.
The picture section of my page won't work because the pictures are added into the html with .jpg but github has it as .JPG (capitalized).
So if you go to my site: https://dhuber666.github.io/Frodo/fotos.html you won't see the pictures. However if you click on one of the missing file icon you will get the link to the full picture (but it say that the page does not exist because filename is written in lowercase letter (as it should be) but github has the images capitalized (.JPG)
If you edit the link like so: /Frodo/images/pic4.JPG (sry have to shorten that I can't post more then one link)
it infect works.
So what is this problem? On my local machine it's fine.
I uploaded it on windows with the github shell like normal.
So I go to my local images folder and I see the filename like so: pic4.JPG --> If I right click it properties it says pic4.jpg
So I renamed it to pic4.jpg and after hitting enter I got .JPG again.
I deleted the whole file ending enter. Rename it again and write .jpg and enter --> Now it's actually pic4.jpg.
But how can I push it to github, because it does not recognize it as changed file?
Also how can I solve this for feature pictures and uploads?
Bonus: Cute dog pics on my page :P
Thank you!
I do not know why this is happening, but I know how you can fix it.
Solution 1: Go into the html and make the file extension capitalized.
Solution 2: Change it via the command line.
Github only allows for image change through commmand line. Follow the link above to their guide on changing via command line.

HTML PDF not opening

When I reference a .pdf in my webpage, the file doesn't open when I click on the link. I referenced the .pdf with the full path and the file is in the www folder.
When I hover over the link online, I can see that the link is to my .pdf on file but it doesn't open.
What am I doing wrong?
Thanks (HTML newbie)
Edit 1 - reference:
Filename
Edit 2:
I tried the local links extension and it still isn't opening. I also tried <a href="http://www.example.com/myfile.pdf"> and I get a 403 Forbidden error.
Modern browsers block links to file:// URLs from pages that aren't themselves on a file:// URL, and in the same directory tree.
This is a security feature. There are workarounds that you can install locally so it works on one specific computer. See this Mozillazine article.
Sorry - I don't have the rep to comment. But it looks like your ref structure could be wrong.
Try something like:
<a href="http://www.example.com/myfile.pdf">
UPDATE: Hmmm?
Have you tried just:
<a href="myfile.pdf">
Also, I found this which (while not directly relevant) has some discussions and links that may assist: How to set height on PDF file when linked to from HTML?
^^ Ignore that - it really is more related to how the pdf opens.
FURTHER:
I am assuming the pdf file name has no spaces in it. I also assume you have a local pdf viewer.
So I had a look at a random website which had a pdf link as an example. When clicked, it opened the pdf in a new tab. I am on chrome.
You may be able to use that to figure out what is wrong.
Here is the page: http://www.staff.uwa.edu.au/procedures/communications/media/uwanews
Looking at the pdf for the first listed file, this was their link:
Issue-10-December-2014 [PDF File, 2.0 MB]
It looks like path should be enough, but you might want to add the target="_blank" to open in a new tab.
Maybe also see this, which shows that users set how a pdf is opened - perhaps the settings on your end need to be set up: How to open link to pdf file in new tab using html
Anyway, I wish you the best. Post your answer when figure it all out.

How to see the path of the JS file in Chrome Dev tool

I have js file opened that has a bug under the chrome js dev tool under 'source' tab, but i don't see a way to locate the full path for this file, how can i? there is a file tree on the left, but it doesn't show the location of the file i have currently open. what am i missing? Thank you for help
Put your mouse pointer over the tab with the name of the current open file, a tooltip will be shown, with the full URL to the file.

How to edit HTML source in DevTools

I go to the sources tab and try to edit HTML file - I can't
whereas I can edit js/css files - curious, how can I edit the HTML? if I can only edit it via the Elements tab, then what can I do so those changes reflect in the HTML file found in sources? reason I ask is because I want to save the html file with all the different changes I've made using Devtools
It's weird, but I do it by changing whatever I want in the elements-tab, then right click on the <html> tag and press Copy as HTML, then make a new .txt file, paste it in there, and rename it to a .html file!