Dani 1,932

Can you upload the file as a post attachment here on DaniWeb?

Dani 1,932

DaniWeb is nearly twenty years old, making us older than SO. We’re community forums while they are strictly Q&A. We try to focus more around the community and the people and getting to know each other.

Dani 1,932

In what guide? Are you just spamming??

Dani 1,932


Dani 1,932

Oh, the latest version of Google Chrome also now supports <img loading="lazy"> to lazy load images without javascript.

Dani 1,932

An HTML sitemap is just a regular webpage on your site that links to all of your pages for the benefit of your users. Googlebot will crawl this page and, essentially, also find all the other pages you link to.

A plain text sitemap file is a plain text list of all of the URLs on your site, one per line. They can be submitted to Google Search Console so that Googlebot wil get a list of all of the pages of your site you think are important to crawl.

An XML sitemap is an XML file of all of the URLs on your site you think are important to crawl. The added benefit of using an XML sitemap (which is Google's recommended format) is that you can additionally specify the priority of the page (compared to the other pages on your site) and the last time the page was modified, to give Googlebot some additional information to help with their crawl efforts.

Dani 1,932

Hey there! Welcome to DaniWeb. I’ve been doing SEO for about 25 years (as long as the industry has existed!) so feel free to post your questions and I’ll take a stab at them.

Dani 1,932

Nice to meet you! What is the tutorial you linked to? Is that your site?

Dani 1,932

Also why is your username Juan? lol

Dani 1,932

Hi Alice!! Nice to meet you.

Dani 1,932

Who is [name deted by moderator]? Do you feel like your credit card is attached to her PayPal account?

Dani 1,932

For what it’s worth, I’m a Meraki customer and am very happy with them. I have two devices in my coworking space.

Dani 1,932

Be sure to properly sanitize output!!!!!

echo '<a href="profile.php?user='. urlencode($usersUsername) .'">'. htmlspecialchars($usersUsername) .'</a><br>'; // removed one double-quote
Dani 1,932

Thank you so much for apologizing! I really appreciate it.

In my situation, the JavaScript route was a better option because it only loads the additional CSS required to design the desktop-only code editor upon triggering an open event of the code editor via JS. This saves kB for both desktop and mobile users who are just forum lurkers.

Dani 1,932

Hi there and welcome to DaniWeb. Sure, what do you do for a living?

Dani 1,932

Hi there! What type of stuff do you create?

jawassjunior commented: developing a page, creating of logo and icon +0
Dani 1,932 The Queen of DaniWeb

I have always known that urlencode() encodes spaces as plus signs and rawurlencode encodes spaces as %20. However, I always struggled to know when to use which. I just finally learned today that you should use rawurlencode() if encoding URI paths and urlencode() if encoding query strings. Who woulda thunk it would be that simple?! :-P

Dani 1,932

Oh sorry. I see you’re using Magento. Sorry for asking if you’re using a framework. I was tired when I read your post.

Dani 1,932

I just checked your Github repository and it seems you’re using a PHP framework. Does it log errors anywhere? Does your web server log errors already anywhere?

Dani 1,932

A blank page means that there is a fatal error and the page cannot load. Here is some code I wrote so you can log these errors to a file and see what the error is so you can fix it.


Dani 1,932

Hi there! Welcome to DaniWeb.

Dani 1,932

Nice to meet you!!

Dani 1,932

Have you tried using EXPLAIN to see if you need any indexes?

Have you noticed whether the dates that work vs those that don’t are the ones where you are incrementing the added field?

Dani 1,932 The Queen of DaniWeb

Our CSS and JS files are not being re-downloaded by web browsers when we update them.

The response headers look like this:

cache-control: max-age=7776000
content-encoding: gzip
content-type: text/css; charset=UTF-8
date: Sat, 01 Feb 2020 02:41:59 GMT
etag: W/"5e34c19d-68a08"
expires: Fri, 01 May 2020 02:41:59 GMT
last-modified: Sat, 01 Feb 2020 00:09:01 GMT
server: nginx/1.16.1
status: 200
vary: Accept-Encoding

We want web browsers to cache them for 3 months, but we want them to expire the cache prematurely if the files have been modified. Shouldn't the ETag modify itself when the files are updated, and therefore when the Etag is different from the one already in the cache, redownload the file? Am I misunderstanding how it works?

We are sending a last-modified timestamp but web browsers aren't re-downloading even though the file stored in the cache is from before the last modified date? Is there a header we are missing in order to get the desired behavior?

I'm trying to avoid tacking on a cache buster query string such as file.css?v=2

Dani 1,932

Hi there. Welcome to DaniWeb. However, I’m not understanding this homework question you want help with. Create an array? Have you tried to do it yourself so far?

Dani 1,932

This only writes errors about fatal errors, but you get the idea:


Dani 1,932

It's really difficult for us to debug this based on the information you've provided because it just seems to be a whole bunch of function calls. One of the function calls is for a function that looks like this:

public function name(array $array_name) { ... }

It requires that you call it as such: $object->name($array_name) and it's complaining that what you're passing in (e.g. $array_name) is not actually an array.

However, the code you've provided gives no clue what function wants an array. For example, on line 8, does setUser require an array and $user is not one?? Or on line 8, does set require an array and $user is not one? There's no way of knowing with the information you've provided.

Is there no way in your error logs to see what line the error occurred on? Perhaps overload the error method in your framework so that it spits out the line that errored.

Dani 1,932

In desktop it has 95 / 100 that is acceptable (not great but acceptable).

You wouldn't consider 95/100 better than acceptable? Can you please, please, please link me to a social network / forum site that is better than 95 so I can see what they're doing that you want me to.

For a site that you don't have content managment I can't see why this can't be 100/100

But, of course, DaniWeb is based off of a quite complex content management system. It certainly isn't a static site.

The excessive DOM size issue is a really easy one

Our extensive DOM size is primarily due to page length. Yes, I probably could avoid nesting HTML elements a bit more than I already am, I agree.

I can't understand why extensive composition in a CSS would be logical in any way and why a child of a child of a sector that is unique and has a CSS id it has to have a class if it doesn't have siblings of the same type

Ease of development and managing the stylesheet and HTML code. Also, because it significantly reduces the amount of CSS required. For example:

// HTML on Page 1:

<div id="foo" class="red"></div>
<div id="bar" class="red"></div>

// HTML on Page 2:

<div id="foo" class="green"></div>

// HTML on Page 3:

<div id="baz" class="green"></div>

// CSS just using IDs

#foo, #bar, #baz { color: red; }
#foo.green { color: green; } /* Override Style */

// CSS ...
Dani 1,932

Sorry for taking so long to see this and respond to it.

You say I don't know anything about web development. Aside from not detecting the user-agent and serving content based on it, what else do you think I'm doing wrong?

Dani 1,932

So I checked the HTML code of your website and I see the line:

<link rel="amphtml" href="https://adventurejourney.vn"/>

Basically this is saying that an AMP alternate mobile version of the page is available at the URL https://adventurejourney.vn

But that's not true. That's your regular HTML page.

Either remove that line of HTML code or change it so that the URL it mentions is actually an AMP page.