can a meta genenated by js be indexed by google crawled [duplicate] - meta-tags

This question already has answers here:
Do Google's crawlers interpret Javascript? What if I load a page through AJAX? [closed]
(8 answers)
Closed 9 years ago.
the question is like the title.If I use js to genenate a meta tag ,and append it to the head tag.can the meta content be indexed by google?

it should not in my understanding.
Unless it has recently changes, javascript are not executed by crawlers.
It seems that googlebot has a basic support but you should not rely on it.

Related

Unable to get the contents of a webpage [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
Im writing a script and need the contents of for example this webpage:
https://pcb.inc.hp.com/webapp/#/nl-nl/contents/33128146?type=I&hierarchy=F&status=L&status=O
Im using scrapy and usually all works out but I am currently unable to get the html of this page with Requests or scrapy or any other module. Does someone know what could be going wrong?
The website is using AngularJS to dynamically generate content upon loading. You cannot scrape the contents directly from this website, instead I'd suggest using something like Selenium with Python to scrape data.
Or conversely, depending on what you need, you can check the Network tab in Chrome Dev Tools to see the requests being made, and scrape the data from those URLs.
For instance
Request URL: https://pcb.inc.hp.com/api/catalogs/nl-nl/nodes/0/children?status[]=O&status[]=L&hierParadigm=F
Response: {"baseProdname":"ROOT_NODE","oid":0,"level":0,"status":["O","L"],"cultureCode":"nl-nl","children":[{"baseProdname":"Solutions","oid":8176594,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Scanners/Copiers/Faxes","oid":15179,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Software","oid":8133386,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Ink/Toner/Paper/Printer Supplies","oid":12771,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Laptops and Hybrids","oid":321957,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Printers and Multifunction","oid":18972,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Point of Sale Systems","oid":7491307,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Desktops & Workstations","oid":12454,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Monitors","oid":382087,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Services","oid":8362107,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Accessories","oid":8386448,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"3D Materials and Consumables","oid":20063457,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Handhelds and Calculators","oid":215348,"level":1,"status":["L","O"],"cultureCode":"nl-nl"},{"baseProdname":"Industries","oid":20008722,"level":1,"status":["L"],"cultureCode":"nl-nl"},{"baseProdname":"Tablets","oid":5169094,"level":1,"status":["O"],"cultureCode":"nl-nl"},{"baseProdname":"Projectors","oid":3338965,"level":1,"status":["O"],"cultureCode":"nl-nl"},{"baseProdname":"Digital Cameras and Photo Studios","oid":382085,"level":1,"status":["O"],"cultureCode":"nl-nl"}]}

How to generate an pdf invoice in a NodeJs, Express and JQuery? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have made a program based on the stack NodeJs + Express + MongoDB. It is following salesorders in the process of handling. The program works fine.
Now I like to add an option to take the data of a specific salesorder (MongoDB database) and generate a .pdf invoice. Where to start?
Are there programs/options to generate a sort of dynamic fields?
How to fill a certain pdf with data from a database in NodeJs/Express? Preferably with MongoDB?
There are several options available to solve your problem.
Process
Generate and HTML using dynamic values
How to generate?
You can use template engines like handlebars/EJS etc.
They accept JSON and render the HTML page dynamically
Generate PDF
How to generate?
There are many npm modules available which take a screenshot of HTML page and generates image or pdf.
Suggestion: Use Puppeteer
alternative: phantomjs, jsonToPdf etc.
You can create HTML and store it into a variable. Then there are lots of npm package available to convert HTML to pdf.

node express template engine that supports layouts and partials [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there a good way of doing templating (that allows me to write html -- not jade), that will support layouts and partials?
I have only been able to use ejs with express-partials npm plugin to get this behavior. However I feel the ejs site is out of date and not well supported.
I'm looking for good examples.
I want to create a main layout that would have header + footer and include a separate template for the nav for example.
Knockoutjs looks well supported, but I cannot find many examples of using it with express.
Update: I found a pretty good article here from LinkedIn's evaluation of js templates: http://engineering.linkedin.com/frontend/client-side-templating-throwdown-mustache-handlebars-dustjs-and-more
You can easily mimic this with the "include" feature in EJS. It's not quite as elegant as layouts in Express 2.x but it works for simple scenarios where all you need is a header and a footer plus you don't need to use Jade.
Basically you can create two "layout" pages (layoutTop.ejs and layoutBottom.ejs) and manually include them on every page.
mypage.ejs
include layoutTop
html for my page.ejs goes here
include layoutBottom
(Shameless plug) You can see a more detailed explanation here:
http://hectorcorrea.com/Blog/Using-layouts-with-EJS-in-Express-3.x
I have settled on using visionmedia's ejs with ejs-locals for layouts, includes, and blocks.
https://github.com/RandomEtc/ejs-locals
https://github.com/visionmedia/ejs
Try twigjs. It fits your description well.
https://github.com/fadrizul/twigjs
But ejs don't looks for me unsupported either. I think that this are even solutions.
Give handlebars a try.
You can use it with hotplates to have your templates automatically resolved.
It also supports reusing your partials client side.

write the domain without extension [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I found that sometimes when I write the name of a site it gets to the right website. for example when I write google I get google.com and when I write facebook I get facebook.com.
But when I write mohamedkadri I don't get mohamedkadri.com.
I thought That the browser uses the that name to get the site when it has been previously visited and cached, but I also visited mohamedkadri.com but mohamedkadri doesn't get mohamedkadri.com
How does this work? and who is the responsible for that, the host or the browser, or even the default search engine in my browser?
Thanks
Some browsers use the 'feeling lucky' google search (or other search engines) to return the first result for a given keyword.
If you search on google for 'facebook' you'll get facebook.com as the first result.
If you search for 'mohamedkadri' you don't get 'mohamedkadri.com' as the first result.
It's up to your browser to decide which site to access. In the case of Firefox, the term for the address bar is the 'Awesome Bar', which uses a combination of search, history, and favorites to get you where you want to go Here's some more information
I just did a little testing in Chrome, and it looks like I'm set to a google search if the tld is left off. I'm not sure of the reaction of IE but I think it functions similarly to Chrome.

What are the advantages and disadvantages of a web site that contains a single page? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I would like to code a little web site that will contain several sections like "Home", "Gallery", "Contact Us", "FAQs", and so on.
I thought to do this in one HTML by putting each section in a div and show only one div per time (using Javascript / jQuery), based on the chosen menu button.
Alternatively, I could create a separate HTML page per section, and link these pages to the menu buttons.
What are the advantages and disadvantages of these two methods ?
The first method means longer loading times since you have to load everything on the site up front, and it's totally broken for people who have disabled Javascript or whose browsers don't support it. The second method means the user only has to load the content they are actually looking at, and it should work even with non-Javascript browsers.
The main disadvantages that comes to mind for the first method are:
Poor SEO: Google will only see your home page as Google bot doesn't execute javascript.
Back/Forward buttons won't work.
Takes longer time to load initially.
As site becomes bigger, it'd need more memory and might slow down the browser and even the machine
The advantage of the method would be speed, when navigating you don't need a round-trip to the server.
It also has a couple of disadvantages the main ones are;
You can only link to the front-page, not directly to for example the about page because it doesn't have a separate url.
The back button in the user's browser won't work anymore.
The Advantages of the Javascript solution are mainly that you dont need to reload the page which is very nice for the user.
On the other hand you have the visitors with javascript disabled who wont be able to load the different pages. Also you cannot navigate over Javascript pages with the browser's back and forth buttons.
The last thing I see is that your code could become messy if you're not very careful and organized.
SEO for one thing - Googlebot will likely only ever index the home page, and your other pages will be effectively invisible to search engines.

Resources