Try to find the date url was created - html

I had to search but I didn't find the information I needed. Is it possible to access and find out when a webpage accessed on google was created?
I try inspect the code find where is the date and other ways but i didnt find.
Thanks

Step 1: Go to google.com and copy-paste the full URL of any web page in the search box and prefix it with the inurl: operator.
For instance, if the URL of the page is:
https://www.example.com
You should write the URL in the Google Search box as:
inurl:https://www.example.com
Press the Search button and the URL in your browser address bar would read something like this:
https://www.google.com/search?q=inurl:https://www.example.com
Step 2. Now go to your browser’s address bar - press Ctrl+L on a Windows machine or Cmd+L on Mac - and append &as_qdr=y25 to the end of the Google search URL. Press enter again.
The modified Google search URL would become:
https://www.google.com/search?q=inurl:https://www.example.com&as_qdr=y25
The as_qdr=y25 parameter instructs Google to do a date-based search and retrieve pages that have been indexed by the Googlebot in the past 25 years (in other words, everything).
Step 3. Google will load the search results again but this time, you’ll see the actual publication date of the web page next to the title in Google search results.
credit to this article.

Related

How do I redirect a user to another page based on what the user has entered in the taskbar using Chrome Extension?

I am looking for a solution for the problem in the Chrome Extension.
If I enter some value in the URL like Mail, Notes, Profile, etc. I want to access the keywords before the values are accessed by the browser and then taken for a search which then changes the URL based on the default search engine.
I want to access the words and then automatically redirect the user to another page. I don't really know if it is possible or not, but thought of asking it to the community.
Or, Is there any way we can make some words which will not be searchable using the Address bar, but it should be that we don't need to make changes in the settings directly, but by using the extension.
Any kind of response are appreciated.
I was trying to capture the value that user enters in the Address bar. I found that we can actually find the link that upon searching from the address bar can be captured using Javascript but could not find if it was possible to capture before the search takes place. (immediately after pressing the enter key or search button).

Add suggestion URL for custom search engine in chrome

I have a local search engine backed by a elasticsearch and a thin nodejs API for search. I want to be able to search those documents from Google Chrome (builds available from Google, not Chromium) directly. In this use case, I will use chrome ONLY with this search engine, so I don't want to use OmniBox keyword search API. I want the same behavior as I get while choosing the default search engine in chrome. Which is
Start typing in the OmniBox and it shows a list of suggestions.
Hit enter and it takes to the search results page
I got the #2 working by adding a new search engine under settings and providing the search api's url. I can't get #1 working.
The two urls exposed by my server are:
http://localhost:3000/complete?query=my (this returns a list of search suggestions which I want to show while typing in OmniBox).
http://localhost:3000/results?query=my+sample+query (this returns the actual search results as a web page, this is working)
Things that I have tried:
Added search engine using window.externals.AddSearchProvider with OpenSearchDescription.xml link. The XML has suggestions url as well.
Tried writing a background extension with OmniBox but it does not allow me to search without using a keyword
I searched through Chromium and found this JSON file
https://code.google.com/p/chromium/codesearch#chromium/src/components/search_engines/prepopulated_engines.json&q=prepopulated&sq=package:chromium&l=1
But I don't know how can I use it (or if its even possible to do this in official builds of Chrome).
I finally found the solution.
The opensearch.xml document reference can be used as a link in the head section of the HTML page. It contains two URL schemes, one for search results and other for suggestions.
The details can be found here:
Opensearch Document Specs.
As soon as I updated my index.html and opened the page in Chrome, Chrome automatically added a new search engine. It didn't show that there is a suggestions URL under Settings > Manage search engines.
Next, I chose my engine as the default search engine by clicking on Make Default and done! Now I can see all the search suggestions in the omnibox without using a keyword.
There is a Setting Overrides mechanism for Chrome Extensions, which is not widely known, which can achieve what you want, but:
At least according to the docs, it only works on Windows and Mac.
You won't be able to publish the extension unless you can verify the site in Webmaster Tools. Otherwise, you are stuck with unpacked installs.

Google Chrome puts percent sign in all my search queries when new tab is opened

I have an issue where Google Chrome pre-pends a symbol to my search query when I open a new chrome tab and type a search query in the url bar.
For example. I open a new tab and type in "news" and the query returns with this "%news". Then I have to manually delete the % sign and search again for the keyword. Also, if I type in "d3" it automatically converts that into a "?" symbol and searches google for "?". This issue only happens when I open a new tab and search in the address bar. If I actually go to google.com it does not happen.
This is a wrong place to ask, but seems like your search engine setting is misconfigured.
See chrome://settings/searchEngines and see if your default has %%s instead of %s in it.

Unable to serve download links in google apps script

UPDATE: I have found a solution. This doesn't necessarily address every case, so I will leave the question open for a short time in case someone can enlighten me more. I solved it by changing the format of the url: Google Drive allows this format for downloading files:
https://docs.google.com/uc?export=download&id=FILE_ID
So I don't know if this is a problem for other URL's; nor actually exactly why the .getDownloadUrl() doesn't work ... maybe someone can explain. But for now this seems to work in the browsers that I can test ...
I have a simple WebApp script which I run on a Google Site by adding the Apps Script gadget. The gadget runs exactly as the Forms example on:
https://developers.google.com/apps-script/guides/html/communication#forms
The gadget is designed to do the following: when the page is loaded, a form is returned, and the user must enter a license key to get a link to download a product. My code serves the form OK, and gets the form submit OK; and it then validates the key, and if valid, sends back a link to download. All that works fine; and the problem is that no matter what I try to return for the download link, the caja iframe wrapper is preventing the click on the link from actually downloading the file.
My preferred URL to return is in fact via the Drive API: the download file is on the Google Drive, and I get the download link like so:
DriveApp.getFileById(downloadFileId).getDownloadUrl()
But when the returned link is clicked inside that caja iframe generated for the WebApp gadget, nothing happens. I have tried a few other URL formats pointing to that file on the Drive, but nothing is working for a download.
Is this possible?
.getDownloadUrl() method returns a temporary URL that can be used to download the file. This URL is valid only for a short period of time, after which it expires and does not return the file any more - that is probably why the links in your web app do not work. Can't remember exactly how long the URL is valid for, but I think it could be as short as 5 minutes.
Permanent download URL is stored in another file property: webContentLink. However, this property is not (yet) available through Google Apps Drive Service - you must use Advanced Drive Service to access it. You can enable Drive API under Advanced Google services in your script. After it is enabled, you can use it like so:
var file = Drive.Files.get(FILE_ID_HERE);
var dlUrl = file.webContentLink;
This will return the link just like the one you found and posted in your update. An advantage of using the Drive API to get the link, instead of hard-coding it, is that if Google ever changes the format of that URL, your code using Drive API to get the link will continue to work, while hard-coded links will not.
Full Drive Web API reference (what Advanced Drive Service uses) is at https://developers.google.com/drive/v2/reference/.

Launching the Google Drive sharing dialog in an app. What should be the APP_ID value?

I'm following this article, trying to add a sharing dialog in a web app.
I got the button working in opening the modal popup, but it just prints this error in the console:
Refused to display 'https://drive.google.com/share?id=SOME_LONG_ID&foreignService=explorer&shareService=explorer&shareProtocolVersion=2&command=init&subapp=10&popupWindowsEnabled=true&shareUiType=default&rand=1386925457304&theme=2&client=postMessage&appId=MY_APP_ID&embedOrigin=http%3A%2F%2Fmy_app.appspot.com'
in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
And the modal itself just shows the message "Sorry, sharing is unavailable at this time. Please try again later."
For the checklist at the bottom of the article:
The user is signed in to Google True
The user has installed your app False How do I ask them to install?
The URL of the page that launches the dialog must have the same origin as the Open URL registered for the app. True
So I have 2 questions:
How do I ask them to install my app? It's supposed to be a web app, where there's 1 button to select Drive files via the Picker API (which is now working), and then another button which will sow this Drive sharing dialog to set the permissions of the selected files. There's no need for installation. Will it work for this setup?
What should be the value for the APP_ID? I'm guessing it's the ID in the "Drive SDK" section of the Cloud Console? The console is so confusing and there's so many values for keys, ids, etc. that I have no idea which to use. Here's a screenshot of what I mean by the ID and what I'm trying to use.
(1) Installing means you have to get the user to accept the drive.install scope - instructions here. This will integrate your app with the "open with" menu in Google Drive. But before that can work you will need to tell the Google Cloud Console what url to go to when the user clicks "open" - more instructions. In your case, since you don't actually want to allow the user to open files from Drive you won't be defining any file types, so in reality there won't actually be any visible integration with Drive.
Note that the share dialog will only work on the one page which has the url you specify as the target for "open" (the instructions say this and from experience it seems to be true).
(2) Client ID You can find this in the Google Cloud Console - see above. Mine is a 12 digit number, so yours will probably be too.
I had the same problem. The iFrame error shows up when you call setItemIds if your app_id is wrong. No idea why. Anyway, it started working for me when I used the right app_id -- the one that shows up like in your screenshot.