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
11 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 ...
0
votes
0answers
19 views

Tools cli script analysis [closed]

I work with MySQL based PHP scripts. I often encounter the problem of loading the application to the browsers. I use tools like → https://www.webpagetest.org. This gives me the overall picture, but I ...
1
vote
2answers
70 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
1answer
26 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 ...
3
votes
0answers
44 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 && &...
1
vote
0answers
17 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 ...
1
vote
1answer
275 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 ...
1
vote
0answers
53 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 ...
2
votes
1answer
301 views

How can I track button click in google analitycs?

I had register my website in the google analytics and I had put the script in my default index like this : <html> <head> <meta name="google-site-verification" content="**********...
1
vote
1answer
25 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 ...
1
vote
3answers
2k views

How to trace origin of script injected in my webpage

I was looking through a static site I created on my local server, in my web browser, and found a curious call to an external script <script src="https://engowe.com/ad.php?u=...
1
vote
0answers
18 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 ...
8
votes
1answer
987 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)...
4
votes
1answer
631 views

Separate URLs on tabbed content - good or bad for SEO?

I am building a site that lists shops. Each shop page has two tabs: shop info and reviews. It's one page, with jQuery hiding/showing the right portion of the content. From a purely SEO point of view, ...
2
votes
2answers
62 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 ...
1
vote
3answers
2k views

GA Limit of 500 hits per session - workarounds & awareness?

We're currently walking the fine line between gathering as much data about the user journey and interaction with the site - and also being aware of our 500 or bust limit that GA analytics imposes on ...
6
votes
3answers
3k views

How do search engines handle <noscript>?

On my site, I have something like the following: <noscript> <p> <strong>JavaScript is currently disabled.</strong> Please enable it for a better ...
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]=...
2
votes
3answers
659 views

Can JavaScript be used to obtain real-time GPS location data?

Is it possible to access GPS data (Country name, City name, Street name and house number) in real time on a smart phone with JavaScript?
1
vote
2answers
2k views

Redirect to an affiliate using PHP or JavaScript redirect?

I was asked to introduce a unified self hosted URL-Shortener/Forwarder/Tracking Service for an website that earns money from affiliates. One example I found was one of the bigger german sites for ...
3
votes
0answers
19 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 ...
1
vote
2answers
434 views

Blogger's embedded CSS and JavaScript

I'm trying to host a blog on Blogger with a custom domain. It's all good except the annoyance of many workplaces blocking the Blogger website using web-filters, including mine. This is causing the ...
1
vote
0answers
115 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
0answers
24 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 ...
0
votes
0answers
12 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
59 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
50 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
1answer
64 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
162 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
43 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 ...
1
vote
1answer
22 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
52 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
22 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
72 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
344 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
55 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
187 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
55 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
23 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
18 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 ...
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
105 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
24 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
2 3 4 5
15