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

How to configure Apache to Relay/Proxy Requests to Localhost Port? [closed]

Note: I have read several possible solutions to my question but some are old, the syntax of httpd.conf has changed and/or do not correspond exactly to my situation. I am simply trying to find the ...
1
vote
0answers
23 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 ...
1
vote
2answers
65 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"...
1
vote
0answers
20 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 ...
1
vote
1answer
198 views

How to show backup ads now that AdSense doesn't have the ability to do so for you?

AdSense script results in three things: An ad. A blank space the size of a ad. No ad or blank space added. AdSense used to have a setting to allow you to show a backup ad in case of #2 and #3, but ...
0
votes
0answers
10 views

Dynamically loading list of links with JavaScript (SEO)

An item belongs to a potentially infinite number of categories (usually most of them are spam). After the item page loads, it shows one category link with the highest score (and thus probably non-spam)...
1
vote
0answers
18 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 ...
0
votes
1answer
37 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 ...
1
vote
0answers
24 views

how to delete old wp-ajax row

i was using side cart plugin on my website. here: https://wordpress.org/plugins/side-cart-woocommerce/ i noticed that, the plugin charges heavy process on my web site so i decided to remove the plugin....
1
vote
1answer
46 views

Making HTML text dofollow link with JavaScript is effective for SEO?

I wanted to replace match text to html link in content area in each post on WordPress site. I implemented that by JavaScript as follows. jQuery(document).ready(function(){ var selector = `...
1
vote
1answer
31 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' ...
2
votes
0answers
40 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 ...
8
votes
1answer
958 views

Googlebot encountering JavaScript errors due to rendering outdated HTML files with newer JS files

We recently encountered an issue where we added a JavaScript variable (e.g. var GLOBAL_VAR = true;) to an HTML page (e.g. /Search/Index) and updated the separate JS file (e.g. /Scripts/search/index.js)...
1
vote
1answer
21 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 ...
0
votes
0answers
42 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 ...
-1
votes
1answer
19 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; ...
2
votes
1answer
67 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 ...
3
votes
2answers
261 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"></...
1
vote
2answers
37 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 ...
0
votes
1answer
21 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 ...
6
votes
1answer
178 views

Do cryptocurrency webminers in a blog violate adsense policies?

JavaScript based webminers are used to mine cryoto currencies by using visitors computing power on several sites. Is that illegal? Do they violate adsense policies ? As of now according to adsense ...
1
vote
1answer
42 views

GTmetrix says Statcounter slowing website, any benefit to removing its code?

A few years ago, I installed Statcounter code on my website. It's at the end of pages, just before body tag. It loads asynchronously. When I check my pages on gtmetrix, it states that there are 2 ...
1
vote
0answers
33 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 :
0
votes
0answers
18 views

Should I use and iFrame or Javascript for the best SEO [duplicate]

I am currently doing some research as I'm wanting to build a sort of jobs board. Users can add jobs on my site, and then embed the list of jobs onto their site. From my research, I can tell there are ...
1
vote
1answer
17 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 ...
3
votes
1answer
3k 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
1answer
21 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 ...
1
vote
1answer
37 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, ...
0
votes
0answers
16 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 ...
0
votes
1answer
16 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 ...
0
votes
0answers
16 views

Using the noscript tag as a wrapper for all site content

I want to make a primitive version of the site, which will be displayed only when JS is turned off. This version is also needed for better indexing by search engines. The main version of the site will ...
1
vote
1answer
61 views

What is it called when an HTML block floats while scrolling down the content until something else takes its place?

Recently updated my blog and was looking for the improvements they have added. I noticed a floating section of text that stayed there until a part of description ended. (Similar to the timestamp on ...
2
votes
2answers
4k views

Is there a Lightbox style plugin that fits images to screen size? [closed]

I'm looking for a Lightbox type js plugin that would take into account the browser window size and resize the currently displayed photo so it fits - like the jquery-imagefit plugin does.
4
votes
1answer
62 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 ...
1
vote
0answers
14 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 ...
0
votes
0answers
7 views

Is hiding content using CSS could impact SEO? [duplicate]

Recently I developed my own plugin to animate contents on scroll - when the page is scrolled down to an element, a class will be added to it (a class with animation that changes the element's opacity ...
7
votes
1answer
5k views

How to check if linked JavaScript and CSS files are being used?

I've inherited a website that seems to import every JS and CSS framework my predecessor could think of. Is there an easy way to analyze the site and determine which ones are actually being used? Or ...
1
vote
0answers
18 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 ...
0
votes
0answers
23 views

How to fix slow loading React bundle [duplicate]

I found https://caseyjkey.com/component---src-pages-index-js-16e07fb51b32a6d8779f.js takes a few seconds to load. What is this file, and what tools are available to help me optimize it? When my first ...
1
vote
1answer
23 views

Screaming frog crawling, images, JS and CSS files as well

When I plug in my website URL in the free version of Screaming frog, it also lists the images, CSS and JS files. Is it suppose to be like that?
2
votes
2answers
41 views

How to check if a file loads in JavaScript?

I currently have a lot of data hosted on sites that our not ours, mainly for images. I do have permission to utilize these images but would like to add backup URLs. Much of the data is hosted on ...
2
votes
0answers
19 views

Pagespeed - Render Blocking Resources [closed]

I know there are a few questions on this but I was wondering where I can actually see the scripts that are blocking rendering. Pagespeed Insights will provide a few scripts and CSS, but is there a ...
0
votes
0answers
49 views

Is javascript filter library good for SEO?

I'm currently working on a filter that can contain functionality such as search, sort, pagination, checkbox like in the following image. For now, I use Laravel and trust every functionality to the ...
2
votes
2answers
340 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 ...
0
votes
2answers
77 views

How to get search engines to index dynamically created DOM page

My website's main page has very little content on it until after a javascript function loads all the images to the page. The function is called on the window.onload event. My only problem is search ...
1
vote
0answers
3k views

What is Script Evaluation?

"Reduce JavaScript Execution Time" is one of the generated issues Lighthouse can detect auditing any URL. Sometimes it's reporting a specific file is taking a lot of time in Script Evaluation phase. ...
1
vote
1answer
37 views

How to pass JavaScript errors to Google Analytics using Google Tag Manager

I've read this article: https://support.google.com/tagmanager/answer/7679411?hl=en It's pretty straight forwards: To configure a JavaScript error trigger: Click Triggers and then New. Click ...
0
votes
0answers
12 views

Error caching static js files in my htaccess file. What does this error mean? [duplicate]

I have this in my .htaccess file: <IfModule mod_expires.c> ExpiresActive on # Perhaps better to whitelist expires rules? Perhaps. ExpiresDefault "access plus 1 ...
1
vote
1answer
27 views

Adsense - Proposed implementation of EU user consent policy

I have spent lot of time to understand EU user consent policy with respect to usage of cookies. In summary, as I understand, I cannot save any cookies of my websites (including analytics cookies, ...
0
votes
0answers
17 views

How can make sure my app Module will be always available to Google Search Console (AngualrJS app)

I'm trying to test some of my web pages on Google Search Console. Some of the times i can see the content of the page i look for (but without the dynamic HTML), and sometimes I'm getting errors like - ...

1
2 3 4 5
15