Does clearing browser cache mean clearing chrome.storage extension data? - database

I'm considering hiring a developer from upwork.com to build my chrome extension. He was saying he would need to build it using local storage, but I questioned him and asked why he couldn't use the chrome.storage API. His response was that if the user clears the browser cache, it would clear everything saved in the extension. That didn't seem right to me but I wanted to ask you all.

No, even after clearing ALL browser data and cache if you are using chrome.storage API any data stored in that manner will still be present.
Unless you explicitly clear the extensions storage by command it will not be cleared.

Extensions in Google Chrome will not be removed or preferences changed/cleared.
You are right that this will also depend on where your extension saves its preferences, for example, extensions may allow you to sign in and save your data in the cloud - whereas other may not. There are multiple ways to store this data, ask why an extension developer cannot develop a robust extension?

Related

Client side JS: Persist blob to disk before saving/prompting user for save location

1. The setup
I'm currently initiating a GET request to an S3 bucket (not important) to download a very large file using the browser fetch(). This file is, in it's stored form, raw and unusable binary data, not structured.
2. The task and problem
There are a few things I want to do on the client-side with this data:
I need to process this data as it streams into the client to perform transformations on it (decryption, for example).
Once the data is processed and downloaded, it might still not be of any immediate use to the user outside the context of the web UI. Maybe the data should stay stored within the web app's sandbox disk space unless a user explicitly exports it?
3. The question
Where can I store this blob of unstructured data in both or either of the use cases listed above? There appear to be many options but none that fit this use case precisely. Any thoughts?
EDIT:
I feel like an idiot. I totally forgot about the FileSystem API. I'll take a look and answer my own question with a pseudo-implementation of this works.
EDIT 2:
I feel the need to reiterate what I stated in 2.2 above:
within the web app's sandbox disk space
I don't care about accessing the user's whole file system. I just want a space I can work with large files in on disk, similar to the app space directories provided to mobile applications by Android and iOS.
If you want to save and process a file at client level, and Blob is not an option, you may consider File System Access API (https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API#writing_to_files), even if this will introduce an interaction with the user.
Another option would be to take the advantages of PWAs client-side storage (https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Client-side_storage), this is also about your application architecture.
Before to check if to process your file at client level can be done as you need with the existing technologies, check if you really need to do that because it is only option, or, instead, if you are able to move such logic at server level, depending on your use cases.

Access questions programmatically? [duplicate]

I would like to (programmatically) convert a text file with questions to a Google form. I want to specify the questions and the questiontypes and their options. Example: the questiontype scale should go from 1 to 7 and should have the label 'not important' for 1 and 'very important' for 7.
I was looking into the Google Spreadsheet API but did not see a solution.
(The Google form API at http://code.lancepollard.com/introducing-the-google-form-api is not an answer to this question)
Google released API for this: https://developers.google.com/apps-script/reference/forms/
This service allows scripts to create, access, and modify Google Forms.
Until Google satisfies this feature request (star the feature on Google's site if you want to vote for it), you could try a non-API approach.
iMacros allows you to record, modify and play back macros that control your web browser. My experiments with Google Drive showed that the basic version (without DirectScreen technology) doesn't record macros properly. I tried it with both the plugin for IE (basic and advanced click mode) and Chrome (the latter has limited iMacro support). FYI, I was able to get iMacros IE plug-in to create questions on mentimeter.com, but the macro recorder gets some input fields wrong (which requires hacking of the macro, double-checking the ATTR= of the TAG commands with the 'Inspect element' feature of Chrome, for example).
Assuming that you can get the TAG commands to produce clicks in the right places in Google Drive, the approach is that you basically write (ideally record) a macro, going through the steps you need to create the form as you would using a browser. Then the macro can be edited (you can use variables in iMacros, get the question/questiontype data from a CSV or user-input dialogs, etc.). Looping in iMacros is crude, however. There's no EOF for a CSV (you basically have to know how many lines are in the file and hard-code the loop in your macro).
There's a way to integrate iMacro calls with VB, etc., but I'm not sure if it's possible with the free versions. There's another angle where you generate code (Javascript) from a macro, and then modify it from there.
Of course, all of these things are more fragile than an API approach long-term. Google could change its presentation layer and it will break your macros.
Seems like Apps Script now has a REST API and SDK's for it. Through Apps Script you can generate Google Forms. This API was really hard to find by trying to google for it and I haven't yet tested it myself, but I am going to build something with it today (hopefully). So far everything looks good.
EDIT: Seems like the REST API I am using works very well for fully automated usage.
In March(2022) google released REST API for google form. API allows basic crud operation & also added support for registering watches on the form to notify whenever either form is updated or a new response is received.
As of now (March 2016), Google Forms APIs allow us to create forms and store them in Google Drive. However, Forms APIs do not allow one programmatically modify the form (such as modify content, add or delete questions, pre-filled data, etc). In other words, the form is static. In order to serve custom, external APIs are needed.

TagUI RPA Download File From Browser

I want to automatic download file from browser using tagUI.
How can i do this with tagUI? I need Thanks in advance.
Sorry I don't track Stack Overflow for user queries. For issues and questions, raise directly to the GitHub page - https://github.com/kelaberetiv/TagUI/issues
To download files, there are 2 ways.
First way is write the TagUI script to perform the steps as you would normally do to download the file, logging in, clicking whatever you do to download as if you are doing it manually.
Second way is if you are familiar with Python, you can use the download() function to perform the download (provided it is a publicly available URL) - https://github.com/tebelorg/RPA-Python#pro-functions

Does AngularJS $templateCache store data on local hardrive

I'm building an application that presents sensitive patient information.
One of my routes shows presents an HTML fragment received from the server that contains an image of a patient document.
I need to ensure that that document is not accessible on disk after the page is closed
That would be a really big issue if it was left there.
I noticed that the route was caching and I had to remove it from $templateCache to detect changes. Is that just cached in memory or is it local hdd?
A broader question might be: does Angular cache anything on persistent storage beyond what the browser already does according to HTTP cache control headers?
This really depends on the abstraction level you look at:
A Javascript app cannot write arbitrary files to the disk - there is the well-known browser sandbox, and this also applies to angular.js apps. So, if you are not specifically using the Browser offline APIs such as LocalStorage, Cookies, ... in your own code, there will be "just" the usual browser cache. So you should be fine.
Caveat 1: Sometimes it seems to be quite hard to control the browser caches, there are multiple ways browsers cache things as you already mentioned. They can usually be by http headers. So if you configure your HTTP headers very carefully you should be fine.
Caveat 2: There are multiple ways operating systems cache things and they may or may not save some of these caches to disk (as a simple example consider the windows hibernation file: there is probably a copy of your image in there when you had it open in your browser upon hibernation.). This cannot be controlled by a browser app - but for most applications it does not really matter.

Win32 development. Standards

A call to all Win32 developers... I'm developing an application in C using plain Win32. I wanted to ask about Windows development standards regarding these things:
Is there a standard Windows error log api? For example if my client uses my app and it crashes, I would like them to send me the error log and I would prefer this being a standard location so they can maybe access it with a standard Windows log utility.
My app needs to store settings information. I think the registry is the standard utility for this task. Is that right?
My app needs to store and retrieve files that it downloaded from the internet - images, executables etc. Is Application Data/myapp the standard location to store this type of information?
My app needs a very straight-forward database - I'm using CSV for this. I basically need to store and retrieve this type of data so I'm just serializing a .csv file from Application Data/myapp. Is there a better Windows standard way of doing this?
That's all for now :). Thanks!
Is there a standard Windows error log api?
There is the Windows Event Log, but I don't think you want a typical user having to go into it to extract your logged information.
You probably don't want to log by default, unless you're shipping questionable pre-release code. When a user is experiencing problems, then you have them turn logging on. In this case, I recommend placing the file somewhere that typical users have experience with, like My Documents.
By the way, if you're writing a standalone application and want the best possible information in the event of a crash, look into minidumps. Here is a Codeproject sample.
My app needs to store settings information
Yep, registry.
My app needs to store and retrieve files
Yes, App Data. Just be sure to use SHGetFolderPath and CSIDL_APPDATA.
My app needs a very straight-forward database
There's nothing wrong with CSV for simple data. You could store the data in XML and use MSXML to process it, if you prefer. I've used SQlite in the past when I needed fast, lightweight storage of more complicated data.

Resources