Questions tagged [javascript]

JavaScript is a dialect of the standardized ECMAScript programming language, primarily used for scripting web-pages. Use this tag for questions regarding ECMAScript and its dialects/ implementations: JavaScript, JScript, etc., excluding ActionScript.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Request: Tools to concatenate all scripts [on hold]

I was wondering if there were any good tools or plugins for combining all javascript files into one, along with doing the same for CSS on Wordpress. I'm asking this because I'm noticing that the ...
0
votes
0answers
11 views

I need help passing url parameters from landing lage to outgoing link [on hold]

Does anyone have any code i can use to pass url parameters from my landing page to outgoing links on that page?
0
votes
1answer
17 views

Getting this in Google SDTT Tool: “The URL could not be rendered. Some markup may be missing.”

Structured Data Testing Tool giving error in testing via fetch url but working fine when pasting the code. I have some JS code which fetches some content and dynamically inject in the HTML. So I am ...
0
votes
0answers
15 views

SEO for daily changing content with infinite scroll or load more strategy

I have implemented a page that has Listings with shortened teaser content. It infinite scrolls to continue revealing more listings as you scroll via Javascript. The result is something like Quora. ...
1
vote
1answer
34 views

Pagination without pagination URLs - is it bad for SEO?

I've read a few articles about pagination pitfalls but none really describe my situation. I have a products page rendered with ReactJS with about 300 products and pagination (I am also using server-...
0
votes
1answer
29 views

Adding a contact form to MediaWiki

There are a few contact form extensions for MediaWiki that one can download and install but I don't want to use extensions at all (or changing the PHP) if there is another solution in HTML-Javascript. ...
0
votes
1answer
47 views

MediaWiki: Hiding certain HTML elements for non-logged-in users

In a MediaWiki-based non-communal website there are some HTML elements that should be presented only for logged-in-users (an administration menu or some of its links). Usually if I want to hide ...
1
vote
1answer
33 views

Could it be correct to have two Google Analytics UA codes in my site?

OK, I started out on a new job and working on SEO. I saw that it has two UA codes. Since I am a newbie on this, I wanted to know if the use of these codes are correct? Just wanted to know if there is ...
0
votes
0answers
13 views

How does googlebot indexing javascript mixed links (href & onclick on same element)

It's been about 5 years since google indexing javascript and I'm still confused about details. I read here ( Does Google perform onClick actions? ) basics. And then I know that javascript created ...
2
votes
1answer
28 views

Ajax Request with Push State to Current URL SEO Friendly?

After reading up on getting content indexed in Google that is pulled into a page from an AJAX request, I have found that you can use pushState to change the URL and this will allow Google to find it. ...
0
votes
1answer
26 views

How to see how scripts are being loaded in a page?

Using the Inspector tool in a browser, a waterfall can be seen. Also the type of cause for loading specific elements is mentioned, and it can be explored further in the Stack tab for that specific ...
1
vote
2answers
34 views

Does Javascript need to be supported by the server hosting the script?

So, if you want to run a PHP script for example, whatever is hosting you needs to be able to run PHP. Does this also apply to Javascript? As in, if I want to include Javascript on my webpages, do I ...
3
votes
1answer
28 views

Not receiving any data from Google Analytics

I setup a GA property: <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-XXXXXXXXX-2', { ‘anonymize_ip’:...
1
vote
1answer
24 views

Is search engine cloaking caused by JavaScript changing the document object model?

This current article from Wikipedia defines Cloaking as: Cloaking is a search engine optimization (SEO) technique in which the content presented to the search engine spider is different from that ...
0
votes
2answers
31 views

How can I get a web crawler to see dynamic data injected by JavaScript in 2019?

Originally posted this on stackoverflow and it got put as off-topic so posting here. I recently read this google webmasters article from 2015 on accessibility and SEO for web pages using AJAX. It ...
1
vote
0answers
17 views

Mobile Web: Sliding whole page over to reveal navigation underneath

I'm making an all new mobile version of one of my sites. And I've decided that the way I want to do navigation is to have the 'hamburger' button cause the entire page to slide to the right, revealing ...
0
votes
0answers
17 views

Why do so many websites use third-party sites for hosting JavaScripts? [duplicate]

What would be the benefit of my hosting JavaScripts from ajax.googleapis.com and other third-party sites instead of hosting these scripts myself?
1
vote
1answer
32 views

Why use “!” after “#” in URL?

I am working on a project where my landing page URLs will be generated dynamically. I keep hearing that I have to use ! after # in URLs that are generated dynamically, for SEO reasons. But no one ...
0
votes
1answer
15 views

SEO consequences for using IIS Rewrite rule to redirect to static content for crawlers only

I have an AngularJS site that's pretty slow which is causing the SEO to be rather poor. Not to mention, the metadata doesn't render correctly. To fix this, my thought was to use IIS rewrite rules to ...
2
votes
1answer
66 views

How can I fix JavaScript error for my live tested page in Google Search Console? [closed]

This is is a screenshot of my tested page on search console. Can Googlebot read this error and dramatically effect my ranking?
0
votes
1answer
47 views

MediaWiki: How to delete the about page?

in a MediaWiki project I don't need the automatically created About webpage because in this case the homepage already covers the about details of the project. I can delete any webpage but for some ...
0
votes
1answer
47 views

How does CloudFlare Handle JS Redirects?

I need to implement a couple Javascript redirects using window.location on my site. This redirect fires in very specific circumstances and I don't want that redirect cached. I found info about how ...
1
vote
0answers
17 views

Make JavaScript Generated content appear on Search Engines, where content differs on a Single Page

I have a PWA hosted on Firebase. On the main URL, like example.com, there's a lot of content that is generated by JavaScript. At the same time, whenever someone accesses example.com/?key=value, where ...
1
vote
1answer
38 views

Google Analytics doesn't track events, everything else is correctly tracked

I've set Analytics for my new landing page. Everything works correctly( real-time data as well) except for Events tracking. Actually, this is the first time I'm working with Analytics Events tracking,...
0
votes
0answers
19 views

Can I prevent loading some HTML body and head in PWA when javascript is enabled?

We have restricted resource and we can not use server side technology in our website.We are using PWA technology.What is our solution to pages indexed correctly in Google? Can we load some head tags ...
1
vote
1answer
78 views

Embedding Google Analytics/Tag Manager and gtag.js correctly (in WordPress): Is it o.k. in the head or does it have to be after the body tag?

The Google devguide says the following: To install the global tracking snippet, copy the following code and paste it immediately after the tag on every page of your site. Replace ...
1
vote
2answers
27 views

Do I have to add Google Analytics events if I have Javacsript buttons on a page or can Analytics track time on page without them by itself?

On one of my pages I have Javascript code, so when the user clicks buttons the page responds without going to an other page or doing an Ajax call. So the user can be on the page for a while pushing ...
1
vote
1answer
141 views

Google SDTT does not fetch structured data by URL

I initially wrote some code that created the structured data for breadcrumb and product markup on the server's side and rendered them in the <body> of the page. While the mark up was correct ...
2
votes
1answer
81 views

Redirecting a user but not Googlebot to solve problem with iFrames in content

TLDR To work around a problem with a third party documentation writing software I need to redirect a page to another page but only if a user in browser is looking at it. I want the google bot to see ...
0
votes
1answer
85 views

Is “overflow hidden + javascript scrolling control” affect SEO

I have an html page with a css overflow:hidden affected to body My <content> is at top:100% positioned in absolute. When I scroll, a javascript code change the <content> top position to ...
1
vote
1answer
39 views

Can you put all the text in a static tag for SEO but completely re-write the page with JavaScript?

Can our website used the trick: putting all SEO data in some tag, but rendering all the web page elements with JavaScript? How would that work for SEO? May be like: <div> <a href="/about"...
2
votes
0answers
10 views

How to include a link in email that opens an Android app if available, but opens the website if not?

In HTML code for an email is there a way to have a fallback URL when a primary URL cannot be handled? For example: Open app when using Android Open website when clicking on it on a desktop I know ...
1
vote
0answers
39 views

generating part of html with javascript to increase the page loading speed

I've got picture gallery on my website that contains few hundreds of images. These are miniatures that are enlarged when have been clicked. The images are well optimized (they are compressed using one ...
1
vote
0answers
49 views

Method to prevent Google from viewing the addition of many external links at once negatively: nofollow VS iframe VS javascript?

I need to add blocks to the main content of a site. Those blocks contain multiple (between 15-30) links to different websites (with related content). I currently do have good SEO and before I ...
1
vote
1answer
21 views

Will preventing right click using JavasSript hurt SEO?

I am currently using this WordPress plugin, which uses JavaScript to prevent users to access the site contents. Will search engines be able to read the content and index my site? Will it hurt my SEO?...
1
vote
1answer
153 views

Is bad for SEO if browser need to run synchronous JS to get content?

I'm developing a site using symfony + Vue. The problem is that this HTML with non-standard tags (components) gets into the browser. All that contained in the <div id="app"> element must ...
2
votes
0answers
70 views

Mobile-Friendly errors from JS/CSS folders in Google Search Console [closed]

Google Search Console is warning me about Mobile Friendly errors. But all the errors are coming from the assets folder where I keep my CSS and JS files. Can anyone can help explain these errors?
1
vote
0answers
21 views

Browsers load actual website from external server and keep in cache [closed]

So, currently, I'm using 000webhost to host my website, but they only allow 1000 MB to store all the files for my website, which IMO is a little small. So, what I want to accomplish is something like ...
1
vote
3answers
512 views

JavaScript and CSS cached and not updating not updating from WAMP server even though “view source” shows most recent file

I have a WAMP server with PHP 7.2.10. When I change a file, for example .css, the changes is not visible in browser. When I "view source" via my browser (Ctrl+U) I get the updated latest version of ...
3
votes
4answers
94 views

Google showing dynamic page title set by JavaScript rather than the static title embedded in the HTML

On my website the title is initially set through the title tag in the html served by my server. It is then changed to its dynamic equivalent through JavaScript. I want Google to show my website's ...
1
vote
1answer
20 views

Datalayer pushed 'topic' leaking on incorrect pages?

We push in the pages topic into the data-layer, this is autopopulated based on the category being selected when editing the page/post in the back-end (Wordpress). <script> window....
1
vote
1answer
47 views

SPA website, would making an HTML-only version for SEO be worthy?

I made a Vue.js SPA, and since it could affect SEO (specially because a large portion of my client base is not using Google), I was thinking: why not providing an HTML-only version for it? Would ...
1
vote
0answers
41 views

Googlebot cannot access 'maps.googleapis.com' and '.js'. Is this preventing my site from getting indexed in Google search?

When I fetch and render it is showing partial. It looks fine. The same way Google sees it is the same way visitors see it. But 'maps.googleapis.com' and '.js' are showing blocked. But I didn't blocked ...
1
vote
1answer
253 views

NGINX - Rewrite version number in JS file name to parameter for PHP

I had a rewrite from file.js?c=123 to file.js.php?c=123 but query params were downgrading my SEO evaluation. Actually, some proxy CDN do not cache query params. server { location ~ \startscript....
0
votes
1answer
110 views

Is it safe to use JavaScript to insert GoDaddy site seal <script> into an HTML page?

The site seal provided by GoDaddy uses HTML code like: <span id="siteseal"><script async type="text/javascript" src="https://seal.godaddy.com/getSeal?sealID=...
1
vote
0answers
849 views

How do I use the ga() function in Google Analytics when the tag is in Google Tag Manager: Uncaught ReferenceError: ga is not defined

I'm following this: But in my real code, I've used google tag manager to manage google analytics. So I have just one script in the head of my website which belongs to gtm: (function(w,d,s,l,i){w[l]=...
1
vote
0answers
29 views

How to create a pageview using ga() function? [duplicate]

I manage google analytics inside google tag manager and I don't have any separated script for google analytics in the head of my website. I need to use ga() function like this: <!-- Google ...
0
votes
1answer
98 views

Can I have duplicated markup using schema.org?

I have this: <span itemscope itemtype="http://schema.org/NewsArticle"> <meta itemprop="mainEntityOfPage" content="true"> <span itemprop="author publisher" itemscope itemtype="...
2
votes
2answers
146 views

How to listen to gtm events fire from javascript file in my webpage?

I am using gtm with Universal analytics tag in my website. I know gtm fires - "gtm.js", "gtm.click", "gtm.dom", "gtm.load" etc events and send event data to google analytics based on rules specified ...
2
votes
0answers
193 views

How to setup custom dimensions in Google Analytics?

I have been working to track the user visiting my website with their userID. I am able to see the user by using user explorer in the GA View. But i want to fetch the data over the API to do achieve ...