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
4 votes
3 answers
99 views

How to deal with minification

Sorry for such a noob question, I just started learning web development. But I am confuse on how do you handle minification on JS and CSS. For example you minify your JS, CSS files for release but ...
user avatar
  • 141
2 votes
1 answer
52 views

How do I send a file_download event to google analytics?

Google Analytics considers a file download a link to one of their supported file types. But my single page app generates files on the fly and then generates a hyperlink with base64 data and prompts ...
user avatar
  • 121
2 votes
1 answer
58 views

Adding both Google Analytics code and Google Ads conversion tracking code to the same page

I am managing a very simple single page site, and my client wants to start a Google Ads campaign for it. I had added some days ago the Google Analytics tracking code to the page: <!-- Global site ...
user avatar
  • 457
1 vote
0 answers
191 views

Is there a way to force a variant in Google Optimize?

Here Google explains how to get the Google Optimize variant and change your page accordingly using gtag. What I need to do is to be able to set the variant number for a specific experiment with ...
user avatar
  • 2,377
3 votes
2 answers
306 views

Can Cloudflare workers be used for heavy traffic?

I tried to find the details about traffic limit on Cloudflare workers, the only limit I found is by the number of requests. Can I use it to provide extremely heavy traffic 10, 20, 30, 50, 100, or 1000 ...
user avatar
2 votes
1 answer
78 views

Can I use Google Analytics on URL shortener redirects powered by PHP?

I have a short URL website like Bitly which currently redirect users with PHP from my site to a site of their choice. I want to add Google Analytics to the redirect pages but I am stuck on the problem ...
user avatar
1 vote
0 answers
151 views

Google Tag Manager trigger for content in shadow-root?

How do I create a UA trigger that fires when a user clicks on content in a #shadow-root inserted using JavaScript? HTML is as follows, where the site I am working on is "site_A" and the site ...
user avatar
  • 11
2 votes
1 answer
43 views

Will adding parameters to URLs with JavaScript to pass information to Google Analytics affect SEO?

I have written some simple js/php that adds WordPress taxonomies and categories of posts to the urls of blog posts so that we can search in google analytics which posts with matching taxonomies are ...
user avatar
1 vote
0 answers
20 views

Safari causing checkbox to change height and not be selected

Having an issue with Safari rendering a checkbox oddly. On my site if you select a subscription and choose "Subscribe Now" the subsequent page has the issue (don't worry, you don't need to ...
user avatar
  • 254
2 votes
0 answers
130 views

Google Search Console reports "Not all page resources could be loaded" when using embedded Youtube videos

I have a blog but I got a message from Google Console: Page partially loaded Not all page resources could be loaded. This can affect how Google sees and understands your page. Fix availability ...
user avatar
1 vote
1 answer
2k views

AdSense: "adsbygoogle.push() error: No slot size for availableWidth=0"

I'm trying to build a webpage which shows responsive AdSense mobile ad slots when mobile visitors and desktop ad slots when desktop visitors. This is my HTML code: <html><head> <script ...
user avatar
  • 423
-1 votes
1 answer
99 views

Most website visitors don't have Java enabled

So, for the first time ever, I had a look at the "Java Support" dimension in Google Analytics. According to that, most of our visitors don't seem to have Java enabled (115,844 vs. 7,540 page ...
user avatar
1 vote
1 answer
19 views

Site B filling out form from Site A and Site A processes form submittal [closed]

I have a need for website B to grab a form from website A and post the form data to a process on website A. Site A is the 'keeper of data submitted', and site B is an approved client of A that is ...
user avatar
1 vote
0 answers
83 views

Problem with iframe cloaking, How can I add all my website files into a domain name itself?

I have come to the point where a “simple” way of building websites is just not able to facilitate larger projects. I have been using repl.it to simply host and read files I have coded in HTML, CSS, JS ...
user avatar
  • 131
0 votes
0 answers
61 views

SEO Content Length issue: Split html source into multiple files

I am quite novice to SEO and I own a website called pierre-alexandre.io. Since it's a single page with a lot of HTML, I decided to split the html source into 3 different files. So my index.html looks ...
user avatar
2 votes
1 answer
474 views

Accessibility and SEO implications of Fade-in-on-scroll libraries

We want to add some visual appeal to some of our content via scroll animations; IE have the content fade or slide in as the user scrolls down the page. The primary Library we're looking at using for ...
user avatar
3 votes
0 answers
436 views

PageSpeed Insights warns me about my AMP pages: "Remove duplicate modules in JavaScript bundles"

I've checked the score of my AMP pages with Google PageSpeed Insight, and I received this message in red: "Remove duplicate modules in JavaScript bundles" This is the initial piece of code ...
user avatar
  • 423
4 votes
1 answer
389 views

Chrome bug: headless window not rendered (new tab in background) if outerWidth is referenced

[see updates at bottom] When I click on a to my website, it opens correctly in Google Chrome. When I command-click the link, opening a new tab in the background, the page seems to load (correct ...
user avatar
1 vote
1 answer
27 views

what does dynamic rendering actually mean?

Let me explain the situation. Google states that we can use dynamic rendering which just means to use Puppeteer, Rendertron or prerender.io. So, for google bots, we return fully rendered html and for ...
user avatar
1 vote
1 answer
358 views

Can I use scripts to block other script or block/rewrite HTTP requests?

I'm building a personal website using this premade Enterprise-class CMS because it has both the blogging and wiki/docs parts in one package, it's not as gorgeous as a Wordpress site can get but it's ...
user avatar
  • 61
1 vote
1 answer
69 views

Routing in the most SEO friendly way with Angular?

Currently I have an Angular app that routes to a to the "Home` location when the user clicks the logo like this: home() { this.router.navigate(['']) } Is there a more SEO friendly / best ...
user avatar
  • 225
1 vote
0 answers
60 views

Is socket.io web site SEO friendly?

I know google bot load javascript and execute it. for example react app can be SEO friendly if I use react router and ... But does google bot execute websocket (socket.io) and get result and crawl ...
user avatar
  • 111
3 votes
0 answers
111 views

Using display: none VS a SPA approach, when it comes to SEO and performance

Say I have a component like, // first approach (SPA) const Component = () => { const [show, toggle] = React.useReducer(show => !show, false) return ( <div> {show && &...
user avatar
2 votes
1 answer
51 views

Will web crawlers be able to crawl nested sidebar menu for mobile web

I have a simple question. One clicking on any of the breadcrumbs, an overlay appears as per design. For example, in the above image clicking on Physics will bring up all subjects to choose from and ...
user avatar
1 vote
1 answer
484 views

Schema JSON codes and their effect on the page speed rank

I searched in many articles but nobody has talked about this stuff. For example, google suggested JSON-LD for structured data but I wanna know if I add dozens line of JSON codes, does not it affect on ...
user avatar
  • 113
1 vote
0 answers
21 views

Where to put anchor tags in Angular CSR Applications such that routes get indexed? [duplicate]

I built this site with Angular 10: https://fireflysemantics.com/ And when the top level domain is visited it reroutes to this: https://fireflysemantics.com/welcome However There's no link to that from ...
user avatar
  • 225
3 votes
0 answers
25 views

What might select a field and scroll to it, without using 'scroll', 'focus', etc?

I have inherited maintenance of a mess of a project. There's a particular set of (rather tall) pages that scroll way down the page on every page load, and eventually it occurred to me that it's ...
user avatar
  • 131
2 votes
0 answers
729 views

Chrome Mobile: window.open starts up a Chrome PWA instead of opening a new browser tab

I have a PWA which, most of the time, I tend to use in-browser. In Firefox Mobile, I can click on a <button> to execute window.open which then opens a new tab in the browser, displaying custom ...
user avatar
1 vote
0 answers
36 views

Showing more text with JavaScript - Google and SEO aspects

I have a page with several lists. Each list has "Read more" button or link. When clicking the "Read more", additional elements are added to the list (sometimes by just changing the ...
user avatar
  • 373
0 votes
1 answer
666 views

Google Analytics events not working

I'm trying to send an analytics event on a button click and it's not working. When I look in Analytics reports in Realtime > Events section, I can see one active user (the site isn't public yet, so ...
user avatar
  • 103
1 vote
0 answers
104 views

How do I configure WordPress so that it doesn't make calls to `wp-ajax` now that I'm no longer using a side cart plugin?

I was using WooCommerce side cart plugin on my website. I noticed that the plugin caused heavy process on my web site, so I decided to remove the plugin. I tested my website with gtmetrix. For the ...
user avatar
  • 61
2 votes
0 answers
53 views

Track visitors across different domains using Google Analytics even when they don't click between the sites

Apparently there are ways to track visitors across different domain using google analytics as described in documentation here and here. It follows the principle where a visitor click on a link on ...
user avatar
2 votes
1 answer
2k views

DOMContentLoaded vs. 'load' event vs. "Finish"

I understand that the Difference between DOMContentLoaded and load events, has already been answered, and as such it explains the last two values (1.40s, 4.66s) from Developer Tools, but if the 'load' ...
user avatar
  • 365
1 vote
1 answer
31 views

Question on search engine optimization for nodejs website

I just made my first website and I had some questions about how google would index it. For this website, content is only generated once the user interacts with a map seen on the website. I read this ...
user avatar
  • 13
0 votes
0 answers
99 views

Is it SEO problematic to create footnotes with frontend JavaScript?

I have an RTL (Hebrew) MediaWiki 1.34.0 website in which I am having a serious problem creating footnotes for articles with the core Extension:Cite because its de facto lack of support in Hebrew, as ...
user avatar
  • 1
-1 votes
1 answer
36 views

What is the difference of an `if` statement that has an {open-close} brackets, and without {open-close} brackets [closed]

if statement has an open {} close brackets if(example){ return example; }else{ return example; } if statement without open {} close brackets if(example) return example; ...
user avatar
2 votes
1 answer
137 views

How to disable .htaccess file using JavaScript?

By the way, the .htaccess was already enabled to my main directory. Is there any way to disable it using JavaScript? to my client-side? I was just curious about how my files are being secured. Thanks ...
user avatar
3 votes
2 answers
755 views

Do I need to add the Google Tag Manager if I already have Google Analytics?

I have google analytics in my website like this : <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxx-1"></...
user avatar
1 vote
2 answers
204 views

Why adding facebook pixel code reduces the score on gtmetrix?

My score website on gtmetrix is A. When I add facebook pixel code, the scrore is B Look at this : How can I solve this problem? I want to add the Facebook pixel code on my website, but I don't want ...
user avatar
0 votes
1 answer
50 views

Facebook preview content appears to not be processing the javascript

When a Facebook user posts a link to the page a preview of the page is displayed. This tends to have the first image from the page. The page I have has one canned image at the top and the rest of the ...
user avatar
1 vote
0 answers
145 views

SEO for react-native and react-native-web application, can it work?

I am looking at the generated HTML in my react-native-web web application and the volume of HTML is huge. The whole application is build with <div /> and there are some role attribute such as ...
user avatar
1 vote
1 answer
37 views

Is there a CSS or JS solution to stop bad word wrapping arround images on mobile?

I have a blog post here which works fine on a larger screen but not so much on a smaller one. As you can see from the screenshot below the paragraph breaks very poorly around the image. Given how ...
user avatar
1 vote
1 answer
96 views

Will Googlbot and other crawlers see content inserted by JavaScript on the window load event?

Many robots, especially Googlebot, can read content written by JavaScript on sites. There are some methods developed especially for site speed. At the beginning of these, do some operations after the ...
user avatar
  • 13
1 vote
1 answer
435 views

YouTube Subscribe button/link without redirect

I want to embed a youtube subscribe button in my webpage. But each time the subscribe button is clicked, it redirects the user to the YouTube app to subscribe. I want the user to stay in my website, ...
user avatar
0 votes
0 answers
18 views

Seeing massive 307 ga redirects while submitting form

Problem: I'm trying to implement form tracking basis Google's tracking snippet I tested the form submission locally and on staging but the form won't submit (not sure why) and I keep seeing massive ...
user avatar
0 votes
1 answer
22 views

Options -Indexes Blocking external JavaScript [closed]

I have a problem. I do not what to be able users to list in my web so I use this: Options -Indexes For whatever reason the external JavaScript is not loading. But when I erase this line in .htaccess ...
user avatar
1 vote
0 answers
17 views

Volunteer Web Application to Connect People [closed]

Apologies if this is in the wrong place, please move or suggest a move if appropriate. I have some free time on my hands for the foreseeable future. In order to help people in the current climate I ...
user avatar
  • 342
4 votes
1 answer
66 views

When is "async" useful for loading scripts into a web page?

If an external script defines functions referred to in the HTML (e.g. onclick=...), the script should be located in the <head> so that it will be downloaded immediately to make the functions ...
user avatar
1 vote
0 answers
29 views

Google Search not properly indexing AJAX-loaded pages [closed]

I have a static website which uses async jQuery to generate articles (as well as titles and other metadata) sourced from a file (something like $('main').load('/data #location.pathname')). The only ...
user avatar
  • 111
1 vote
0 answers
67 views

How can I enable compression of 3rd party scripts to get a better Gtmetrix score?

If I test my website on the Gtmetrix, there appear like this :
user avatar

1
2
3 4 5
16