Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
14 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
4 views

Build a website that returns input [on hold]

How to build a webpage that returns input from the user to the server using HTML CSS and Javascript?
0
votes
0answers
3 views

Complicated AJAX update with two select elements [migrated]

I have a form with two select elements where users can select a product variant (for example red, green, blue shirt) and the quantity. When changing the variant/quantity, I do a AJAX request to get ...
0
votes
0answers
9 views

My JQuery button won't work on Macbook (Safari) or IPhones (Safari!!) [closed]

I have a button that uses Ajax and JavaScript to send info to the database. It works fine on Chrome and on Android (my Galaxy Note 8). But the weird thing is, I used the exact same syntax (but ...
0
votes
0answers
14 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
32 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
26 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
23 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
42 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
34 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
30 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
9 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
36 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 ...
0
votes
0answers
35 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
20 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
143 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
41 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
18 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
2answers
123 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
71 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
18 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
43 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
38 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
177 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
67 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
230 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
28 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
59 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
95 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
131 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 ...
1
vote
0answers
14 views

Opening a pop up window automatically on the date mentioned in the function [closed]

I want it to remain open from the specified date onwards. This is the code I have. <script type="text/javascript"> function newPopup(url) { popupWindow = window.open(url,'popUpWindow','...');...
1
vote
1answer
69 views

Googlebot refuses to render more than index.html in Ember app

I am using Ember 3.0.0 to create a booking site. Title and meta tags are handled via ember-cli-meta-tags and seem to be rendered correctly when pages are opened in the web browser. However, Googlebot ...
1
vote
1answer
70 views

Internal searches using AJAX affects SEO?

I have read in some sites that is a good practice for SEO to use URLs like www.example.com/params-for-your-search as words separated by hyphens. I'm creating a SPA ReactJS Application where I have a ...
2
votes
0answers
29 views

How to determine how much memory 1 million particles in WebGL is using

I would like to know how much memory is being used by a system of 1 million particles in WebGL: I am not really too sure on what to look for in the performance/memory panels in the Chrome devtools / ...
0
votes
2answers
50 views

JavaScript Charts Vs Server Side Generated Images For SEO

I am currently using Google Visualization (Charts) API to display charts on my website. Fetch and Render on Search Console renders blank spaces in places of charts (quite understandably), while charts ...
1
vote
2answers
32 views

How do I have my javascript “dynamically injected into the page's contents”?

I have a script off site for a Schema (structured data). My Antiquated CMS does not recognize HTML5 and will modify Javascript in the html so I have to have it in a separate file. The problem is ...
0
votes
1answer
118 views

Why would the Google cache and Googlebot not render images?

I’m auditing an e-commerce website but I’m having really difficult time figuring out why Googlebot can’t render the pages correctly. When I check the cache of the pages I see that Googlebot couldn’t ...
0
votes
0answers
36 views

Does too much JavaScript discourage bots from indexing?

Along with lengthy content I am using many JavaScript components like client-side graphs (Google charts API), DoubleClick (with Adsense) and others. When I fetch and render from Search Console, I can ...
3
votes
0answers
48 views

What is the name for a paginated scrolling effect with distinct stopping points in the scroll?

For example: http://deppo.tkdemos.com/portfolio/grid-references-in-the-latest-issue/ What is the name of the scrolling effect used on the link above? Where when you scroll or arrow down the page ...
0
votes
0answers
32 views

Accessing pdf using iframe on different IP

I have WAMP installed in a machine in IP address I just call as IP1. I can access the PDF files in this IP1 inside the www folders using iframe with no problem. But there are other PDF files inside ...
2
votes
1answer
381 views

Is a dynamic page title tag updated by JavaScript bad for SEO?

I was on Infinium's (web/app design agency) blog and noticed that when I clicked on another tab in my browser, the title tag changed from "Best Rails image uploader..." (the title of the post) to "...
1
vote
0answers
49 views

Do too many google chart scripts affect adsense loading

I have a fairly dynamic website that uses google visualization api. (Every page displays 6 to 10 charts.) <script type='text/javascript'>google.charts.load('current', {packages: ['corechart','...
0
votes
0answers
55 views

Hidden Link through JS or AJAX

Is there a way to hide a URL behind JavaScript? I want to place ads where the GET URL isn't obvious. I'm thinking that perhaps some JS or AJAX can take the brunt of the work to forward the user. I ...
4
votes
2answers
498 views

Rewrite all URLs within subdirectory to index.html so JavaScript can use the path

I have a part of domain example.com/~mypart. In that folder is index.html. If I visit example.com/~mypart/something I get a "Not Found" error. I want every address with some string after example.com/...
1
vote
0answers
470 views

JavaScript console errors in Google Search Console - is it still mobile-friendly?

I am seeing mobile usability issues in my Google Search Console report. When I tested the pages they were 'Mobile Friendly' but there were some page loading issues: page resources couldn’t be ...
4
votes
1answer
264 views

Dynamic content using .append() or .innerHTML() and SEO

I was looking for some clarification on something I am looking to implement, I would like to know how a Google Crawl will see this and if it would be detrimental to SEO. On my webpage I have an empty ...
1
vote
0answers
235 views

How to remove form autofocus on a Twitter Bootstrap form

I'm using Bootstrap on a site. Bootstrap is loading via a cdn. I can't edit the code directly. How can I remove the form auto focus? When I visit the page it automatically jumps down to the bottom of ...
3
votes
1answer
95 views

Will “dofollow” work for non-anchor tags?

I'm developing a SPA using Ionic, and for performance, UX, and indexing reasons I'd like to use <span> tags instead of <a> tags, as the latter doesn't work very well with Ionic's stack-...
3
votes
1answer
162 views

Can Google read structured data that is written by JavaScript depending on the URL parameters?

Is it possible to create a page with different structured data depending on the URL parameters? According to Google: Also, Google can read JSON-LD data when it is dynamically injected into the ...
1
vote
0answers
16 views

Weird response from website buttons [closed]

I'm building a website using html, css and JavaScript. I'm having issues with the buttons on my page, where I have to press them twice to activate them, after that they work fine. It appears that this ...