Recovering cache mozilla firefox - firefox

I have just destroyed an entire style.css file on a server. I was really tired and managed to delete the entire thing.. Now i need to recover this somehow. I have already pressed ctrl + f5 to view the changes but ofcourse i broke the entire thing.
I am using mozilla firefox and have tried using about:cache in the browser window but it only displayed the empty version of style.css.
Do you guys think i could locate the mozilla firefox cache folder and try recovering the entire folder searching for the file. But i have heard that firefox is using a security feature that doesn't name the files in original file names and extensions?
Id be grateful for any help!! Thanks

I was able to scavange the file using this software http://www.nirsoft.net/utils/mozilla_cache_viewer.html on another company pc that still had it in the cache.
But lesson of the story is have backup and do use git!! Will save you a lot of hassle.

Related

How to run Google Keep as an App in Windows

How does one run Google Keep or other websites like an app or kiosk on a Windows PC.
Since I figured this out and nobody seems to of had a response, I made my own question and answered it. Credit to OurCodeWorld for helping figure out some of the fine tuning. He had a --chrome-frame flag, but I believe that is depreciated, so I am looking into it. But it seems to work fine without it
TLDR: Create a shortcut to chrome and add --app= this to the end of it. like this --app=https://keep.google.com/u/0/.
Now if you want it to have a specific size window? Well, you will have to add --window-size=WIDTH,LENGTH. But... Chrome saves the size of the last window closed, which If you use Chrome as a browser, this will change frequently. To solve this, we create a separate user-data directory --user-data-dir="C:\ExampleDir". This folder is around 50mb of who knows what...
So the whole thing put together, like this.
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir="%localappdata%\GoogleKeep\User Data" --window-size=950,1000 --app=https://keep.google.com/u/0/

how to restore Firefox not the last "Restore Previous Session" pages

I would like to restore not the last "Restore Previous Session".
Open firefox (v78.0) with few tabs: aaa.com, bbb.com.
Close Firefox.
Open Firefox, open few tabs, ccc.com, ddd.com.
Close Firefox.
Open Firefox. How to get those tabs aaa.com, bbb.com from "Restore Previous Session"?
I went to the address bar of Firefox, typed about:support and saw which is the profile folder of Firefox.
I figured out that some versions of Firefox create a
c:\Users\MY_USER\AppData\Roaming\Mozilla\Firefox\Profiles\j1hcxbyk.default-release\sessionstore.jsonlz4 file when Firefox is closed.
I also found a copy of a session file
c:\Users\MY_USER\AppData\Roaming\Mozilla\Firefox\Profiles\j1hcxbyk.default-release\sessionstore-backups\upgrade.jsonlz4-20200630195452
So, I:
stopped Firefox,
made a back-up copy of the profile folder,
replaced sessionstore.jsonlz4 (or copied there if that file didn't exist) with upgrade.jsonlz4-20200630195452,
started Firefox,
restored the previous session with: Menu->History->Restore Previous Session,
checked that the old session, with my tabs, was restored.
Note: I chose upgrade.jsonlz4-20200630195452 because it was created in the same day, when I closed Firefox with all my tabs.
Recently, I faced the same issue of missing tabs when I restored the correct system date from some earlier date. After scouring the internet, I got the following tip to restore the firefox tabs back from saved sessions. My PC runs Microsoft Windows 10 Home with Firefox version 91.0.
Reference: https://support.mozilla.org/en-US/questions/1314940
"At startup, Firefox usually will look first for sessionstore.jsonlz4 at the main level of your profile folder and if it finds it, use its contents to create recovery.jsonlz4 -- if you restore automatically -- or previous.jsonlz4 -- if you do not restore automatically. So you could try replacing that file if you haven't already (as well as recovery.jsonlz4)".
Close the firefox browser.
Open %AppData%/Mozilla/Firefox/Profiles folder
Select the latest folder that contains .default in it.
Open sessionstore-backups folder. Now your path would be something like %AppData%\Mozilla\Firefox\Profiles\13dn9aq1.default-1473265690957-1560267471460\sessionstore-backups
Locate files with upgrade.jsonlz4- prefix and select the one which you think probably would contain your tabs.
Keep the original one untouched. Create a copy of it and rename it to sessionstore.jsonlz4
Copy the sessionstore.jsonlz4 file. Locate the sessionstore.jsonlz4 file in the folder one level down: %AppData%\Mozilla\Firefox\Profiles\13dn9aq1.default-1473265690957-1560267471460\ and replace it with the sessionstore.jsonlz4 file just copied.
Now you can open Firefox and you will get all your old tabs from the restored session.
The folder .default. can be located as follows also,
Type "about:profiles" in firefox and press enter
Click "Open Folder " next to Root Directory path
I had the same issue, and Firefox wouldn't read the *.jsonlz4 files properly, so I coded a little script to extract the URLS stored inside *.jsonlz4 files:
https://github.com/matthieuheitz/recover-firefox-session
Some people use this tool: https://www.jeffersonscher.com/ffu/scrounger.html, but it didn't work for me as the *.jsonlz4 files were very large (> 50MB), and the website just lags forever.
Recent Firefox version (version 96 this time, or at least the Linux one) doesn't have sessionstore.jsonlz4 in the root of the profile, so the other advices does not seem to work.
Firefox nightly upgrades a lot, so I have a very good chance to have FF restarted and lose all the session with no "restore session" available at all.
The solution (for me at least) was
stop Firefox
go to session backup directory at ~/.mozilla/firefox/<session_name>/sessionstore-backups/
copy any old file over recovery.jsonlz4 (say, cp upgrade.jsonlz4-20211112213406 upgrade.jsonlz4-20211112213406)
start firefox, and let it automagically restore th old session
It seems firefox only stores only the last previous.jsonlz4 there apart from upgrades, so it may be useful to ask cron to make periodical backups of recovery.jsonlz4 or similar.

DongFangInput keeps installing

have an application that keeps reinstalling itself even after uninstall. It's an app that helps you type in chinese characters. As you can see from the format of this message that it messes with my typing.
Can anyone please help?
PS:Idont even know how to at least turn it off because everything is in chinese.
I have the same problem since last Saturday (26/4).
I used unlocker as recommended by another website to remove the application. But my alt+shift and Window+space hot keys are both not working anymore. So I restored window back to a previous restore point for restoring the hot keys.
However, after a while the application reinstalled back.
I tried unhackme but the application reinstall after a few reboot. For the passed 1 week I've been fighting with this application.
On the 30/4, I was thinking whether to refresh my windows, suddenly I realised that I had copy an excel file from my client on 25/4. His computer same having the same problem. So I tried to delete the said excel file but it can't be deleted. So I use unlocker to delete the folder storing the excel file. than I use unhackme to remove all file/program related to Dongfanginput, use unlocker to delete the folder at program folder, restore window to a previous restore point. My computer is running smoothly for pass 2 days and hoping that the problem wouldn't come back again. (sorry for my poor English)

Creating a local folder through an url

imagine you want to have a link on a website that creates a local folder and opens it in the Windows Explorer as soon as click on it. Something like Go to new folder
I know there is the file:-protocol, but this only opens a local folder. Is there a way to specify in the url that the browser should also create the folder.
It might be against lot's of security policies. But I'm just curious if there is any way you could achieve that. What ever come in your mind? Don't hold back.
Cheers,
Gerardo
As you mentioned, this is not allowed for web pages from internet. (imagine a rogue script running thousands of these)
You may be able to open an existing folder, in the browser (not via Windows Explorer, unless it's IE and the page is trusted).
If you want to create a folder, try using Offline Storage APIs for HTML5. This may not accomplish the 'opening in Win Explorer' part, but you can store data on user's machine.
Hope this helps.

Quick and easy question for Firefox add-on devs

I am following the instructions here to make my development environment for firefox:
https://blog.mozilla.com/addons/2009/01/28/how-to-develop-a-firefox-extension/
and everything is working great.
On the page as you can see there is one instruction:
Point your Firefox extensions directory to your extension
Instead of constantly preparing and
reinstalling your extension, there’s a
simple way to add a pointer from your
Firefox extensions directory to your
code location. To do this, you must
first find your profile directory: ...
And that too is working great!
My question is:
When I make changes to the JS file in the dev directory, do I have to keep restarting FF for the changes to take effect? Because when I create an extension in Chrome there is a simple link that says "reload" and clicking that reloads the extension without me needing to restart the browser... does any such functionality exist for FF?
Thanks!
R
Extension Developer extension has an option to reload chrome. Doing that should reload your extension without restarting Firefox.
It really depends on the JavaScript files. XPCOM components and JavaScript modules load only once, there you unavoidably need to restart when you change them. JavaScript files loaded via <script> tags are only valid for the window that loaded them - opening a new window will do to load a fresh copy of the script. All that will only work correctly if -purgecaches command line option is specified as other people noted already.

Resources