Finally, my free space!

25th June 2016 Welcome page No comments

Here we go, finally I established my blog, or actually “my free space” as I love to call it. 😉

I established this blog in order to publish code related articles, code hints, code workarounds and tips and tricks.

Here’s a small brief about me ( not small enough 😀 ).

It’s me Said Abdul Aziem Mohamed, a Webmaster Manager at DMG Group. I have a passion for User Experience and Web Development.

Everything I know about UI, UE, CSS, HTML, jQuery, PHP and MySQL was all self taught by looking online and buying books and video tutorials related to UX and Web Development. I have been continuously employed since high school and throughout college, which helped ramp me to my current positions at DMG. I’m also in love with my current position at DMG as Webmaster Manager.

I am discovering that I seriously enjoy user flow, User Experience and Web Development, and would like to transition my career towards this wire-framing and development path.

I love figuring out what makes users tick and click, also I adore developing easy to use and smooth back-ends.

I also am getting serious about my Web Design, so feel free to message me if you would like a web design, psd to html/css or anything else! I would currently like to learn (or get to know better): User Experience Research, SASS, HTML 5, jQuery/jQuery-UI, JavaScript, AJAX, IOS Development. ——-

Interesting Points of Discussion ——-

  1. What’s more important? Creating a product to create fantastic metrics? Or creating a product that creates a “good feeling” and a lasting impression?
  2. When should you use tables, and when should you use CSS? Always CSS for presentation, of course! But sometimes divinities will get you down. How do you get around that?
  3. Find me a way to wrap a really long word (like supercalifragilisticexpialidocious) onto the next line of a 20px width div in CSS that works in all browsers. (?)
  4. When to use CMS, and when to start a “From Scratch” website? Specialties: HTML Markup, CSS, User Experience, User Interface, Photoshop, Photography, Agile, JIRA, PHP, OOP, JavaScript, jQuery, PHP Frameworks.

Sichere Einzahlungen und schnelle Abhebungen bei Avia Masters

10th November 2025 Uncategorised No comments

In diesem Artikel werfen wir einen Blick auf die verschiedenen Möglichkeiten, die Avia Masters seinen Nutzern für sichere Einzahlungen und schnelle Abhebungen bietet. Als erfahrener Spieler habe ich einige wertvolle Einblicke und persönliche Beobachtungen, die Ihnen helfen können, das Beste aus Ihren Transaktionen herauszuholen. Egal, ob Sie ein neuer Spieler sind oder bereits Erfahrungen gesammelt haben, hier finden Sie alles, was Sie wissen müssen, um Ihre finanziellen Aktivitäten bei Avia Masters zu optimieren.

Die verschiedenen Zahlungsmethoden bei Avia Masters im Detail

Avia Masters bietet eine Vielzahl von Zahlungsmethoden an, um den unterschiedlichen Bedürfnissen der Spieler gerecht zu werden. Von Kreditkarten über E-Wallets bis hin zu Banküberweisungen ist für jeden etwas dabei. Besonders beliebt sind E-Wallets wie PayPal und Skrill, da sie in der Regel schnellere Transaktionen ermöglichen und zusätzliche Sicherheit bieten. Diese Optionen sind ideal für Spieler, die ihre Gelder schnell und unkompliziert verwalten möchten.

Außerdem können Sie auch mit Kryptowährungen wie Bitcoin einzahlen, was in der heutigen Zeit immer beliebter wird. Die Anonymität und die schnellen Transaktionen sind ein großer Vorteil, insbesondere für Spieler, die Wert auf Datenschutz legen. Bei Avia Masters wird die Nutzung dieser Zahlungsmethoden durch eine benutzerfreundliche Oberfläche unterstützt, die es Ihnen ermöglicht, schnell die gewünschte Methode auszuwählen und Ihre Einzahlungen umgehend durchzuführen.

Zahlungsmethode Bearbeitungszeit Minimale Einzahlung
Kreditkarte Sofort 10 €
PayPal Sofort 10 €
Banküberweisung 1-3 Tage 20 €
Bitcoin Sofort 0.001 BTC

Warum Sicherheit bei Einzahlungen und Abhebungen entscheidend ist

Sicherheit ist ein zentrales Thema, wenn es um Online-Glücksspiel geht, und Avia Masters hat dies erkannt. Die Plattform verwendet modernste Verschlüsselungstechnologie, um sicherzustellen, dass alle finanziellen Transaktionen geschützt sind. Diese Maßnahmen helfen, Ihre persönlichen Daten und finanziellen Informationen vor unbefugtem Zugriff zu schützen. In meinen Erfahrungen habe ich festgestellt, dass eine sichere Plattform nicht nur das Vertrauen stärkt, sondern auch das Spielerlebnis insgesamt verbessert.

Ein weiterer wichtiger Aspekt der Sicherheit ist die Überprüfung der Identität der Spieler. Avia Masters verlangt in der Regel eine Verifizierung, bevor Sie größere Abhebungen vornehmen können. Dies mag auf den ersten Blick lästig erscheinen, ist aber ein entscheidender Schritt, um Betrug und Geldwäsche zu verhindern. Wenn Sie sich einmal verifiziert haben, können Sie sich sicher sein, dass Ihre Gelder in guten Händen sind und Sie im Falle eines Problems schnell Hilfe erhalten.

Wie Avia Masters Betrug und Missbrauch vorbeugt

Die Sicherheitsmaßnahmen von Avia Masters gehen über die Verschlüsselung hinaus. Die Plattform hat auch Systeme implementiert, die verdächtige Aktivitäten erkennen und sofort darauf reagieren. Dies bedeutet, dass, wenn ein ungewöhnliches Verhalten festgestellt wird, Ihr Konto vorübergehend gesperrt werden kann, um Ihre Gelder zu schützen. In der Regel wird die Plattform Sie umgehend informieren, sodass Sie schnell handeln können.

Die Geschwindigkeit der Abhebungen: Was Sie erwarten können

Wenn es um Abhebungen geht, ist Geschwindigkeit ein entscheidender Faktor für viele Spieler. Bei Avia Masters können Sie in der Regel mit einer schnellen Bearbeitungszeit rechnen, insbesondere wenn Sie E-Wallets oder Kryptowährungen nutzen. In meinen eigenen Erfahrungen hat die Verwendung von PayPal oder Bitcoin häufig zu sofortigen Abhebungen geführt, was natürlich eine großartige Sache ist, wenn man seine Gewinne schnell in die Hände bekommen möchte.

Es ist jedoch wichtig zu beachten, dass die Bearbeitungszeit je nach gewählter Zahlungsmethode variieren kann. Während E-Wallets oft sofortige Abhebungen ermöglichen, können Banküberweisungen mehrere Tage in Anspruch nehmen. Daher empfehle ich, im Voraus zu planen und die Methode zu wählen, die am besten zu Ihren Bedürfnissen passt. Wenn Sie geduldig sind und nicht sofort auf Ihr Geld angewiesen sind, kann eine Banküberweisung dennoch eine gute Option sein, insbesondere wenn Sie größere Beträge abheben möchten.

Praktische Tipps für reibungslose Transaktionen bei Avia Masters

Um sicherzustellen, dass Ihre Einzahlungen und Abhebungen reibungslos verlaufen, gibt es einige einfache Tipps, die Sie befolgen können. Zunächst sollten Sie sich immer über die aktuellen Zahlungsmethoden und deren Bearbeitungszeiten informieren. Avia Masters aktualisiert regelmäßig seine Plattform, und es ist wichtig, auf dem Laufenden zu bleiben, um die besten Optionen zu nutzen.

  1. Verifizieren Sie Ihr Konto frühzeitig, um Abhebungen zu beschleunigen.
  2. Wählen Sie die Zahlungsmethode, die am besten zu Ihren Bedürfnissen passt.
  3. Nutzen Sie die Kundenbetreuung, wenn Sie Fragen oder Probleme haben.

Ein weiterer wichtiger Punkt ist die Nutzung von Boni und Promotions, die Avia Masters regelmäßig anbietet. Achten Sie darauf, dass Sie die Bedingungen für Einzahlungen und Abhebungen genau lesen, um unangenehme Überraschungen zu vermeiden. Oftmals gibt es spezielle Anforderungen, die erfüllt sein müssen, bevor Sie Ihre Gewinne abheben können. Wenn Sie diese im Voraus beachten, können Sie mögliche Probleme vermeiden.

Häufige Probleme und Lösungen bei Einzahlungen und Abhebungen

Trotz der besten Absichten können bei Einzahlungen und Abhebungen manchmal Probleme auftreten. Ein häufiges Problem, das Spieler erleben, sind Verzögerungen bei Abhebungen, insbesondere wenn die Verifizierung des Kontos noch nicht abgeschlossen ist. In solchen Fällen ist es wichtig, geduldig zu sein und den Kundenservice von Avia Masters zu kontaktieren, um herauszufinden, wo das Problem liegt. In meiner Erfahrung war der Kundenservice immer hilfreich und hat Lösungen schnell bereitgestellt.

Ein weiteres häufiges Problem sind Fehler bei den Zahlungsdetails. Wenn Sie beispielsweise die falsche Kontonummer oder die falsche E-Mail-Adresse eingeben, kann dies zu Verzögerungen führen. Daher ist es ratsam, Ihre Zahlungsinformationen vor jeder Transaktion sorgfältig zu überprüfen. Eine einfache Möglichkeit, solche Fehler zu vermeiden, besteht darin, Ihre Zahlungsdetails in Ihrem Konto zu speichern und sie bei jeder Transaktion automatisch ausfüllen zu lassen.

Schlussfolgerung: So maximieren Sie Ihre Erfahrungen bei Avia Masters

Zusammenfassend lässt sich sagen, dass Avia Masters eine Vielzahl von sicheren Zahlungsmethoden und schnellen Abhebungsoptionen bietet, die das Spielerlebnis erheblich verbessern können. Indem Sie sich über die verschiedenen Zahlungsmethoden informieren und die Sicherheit Ihrer Transaktionen im Auge behalten, können Sie Ihre Erfahrungen auf der Plattform maximieren. Nutzen Sie die Tipps und Tricks, die ich im Laufe der Jahre gelernt habe, und Sie werden sicherlich das Beste aus Ihrem Spiel bei Avia Masters herausholen.

Ob Sie nun auf der Suche nach einem neuen Online-Casino sind oder bereits ein erfahrener Spieler sind, die richtige Verwaltung Ihrer Finanzen ist der Schlüssel zum Erfolg. Mit den richtigen Informationen und der Bereitschaft, Strategien anzuwenden, können Sie Ihre Gewinne maximieren und ein großartiges Spielerlebnis genießen. Vergessen Sie nicht, regelmäßig die Website aviamaster.de zu besuchen, um über Neuigkeiten und Promotions auf dem Laufenden zu bleiben.

Społeczność graczy Corgi Bet: Jakie są ich doświadczenia i opinie

6th November 2025 Uncategorised No comments

W tym artykule przyjrzymy się społeczności graczy Corgi Bet. Zbadamy ich doświadczenia, opinie oraz to, co sprawia, że ten serwis stał się tak popularny. Podzielimy się również informacjami na temat bonusów, gier oraz ogólnej atmosfery wśród graczy. Jeśli zastanawiasz się, czy warto spróbować swoich sił na Corgi Bet, to ten artykuł jest dla Ciebie!

Czym jest Corgi Bet i jak działa ta platforma?

Corgi Bet to nowa, dynamicznie rozwijająca się platforma hazardowa, która zdobywa serca graczy w Polsce. Została stworzona z myślą o dostarczeniu wyjątkowych doświadczeń i atrakcyjnych możliwości zakładów. Gracze mogą korzystać z różnych rodzajów gier, od klasycznych zakładów sportowych po kasyno online. Corgi Bet wyróżnia się także przejrzystością i łatwością w nawigacji, co czyni go dostępnym dla każdego, niezależnie od poziomu doświadczenia.

Opinie graczy na temat oferty bonusowej i promocji

Jednym z najczęściej omawianych tematów w społeczności graczy Corgi Bet są bonusy i promocje. Wiele osób chwali ofertę powitalną, która często obejmuje atrakcyjne bonusy od pierwszego depozytu. Gracze podkreślają, że warunki obrotu są jasno określone, co ułatwia korzystanie z bonusów. Zdarza się, że użytkownicy narzekają na ograniczenia w promocjach, szczególnie dotyczące niektórych gier, ale ogólnie panuje pozytywna atmosfera wokół oferty bonusowej.

Warto także wspomnieć o programie lojalnościowym, który przyciąga stałych graczy. Dzięki punktom lojalnościowym można zdobywać dodatkowe nagrody i bonusy, co zdecydowanie zwiększa satysfakcję z gry. Gracze zauważają, że Corgi Bet stara się nagradzać swoich użytkowników, co buduje pozytywny wizerunek platformy.

Jakie gry i zakłady dostępne są na Corgi Bet?

Corgi Bet oferuje szeroki wachlarz gier, co czyni go atrakcyjnym miejscem dla różnych typów graczy. Można tu znaleźć zarówno zakłady sportowe, jak i różnorodne gry kasynowe, takie jak automaty, ruletka czy blackjack. Co więcej, platforma regularnie aktualizuje swoją ofertę, wprowadzając nowe tytuły i wydarzenia, co sprawia, że gracze nigdy się nie nudzą. Warto odwiedzić corgi-bet.pl, aby poznać pełną ofertę gier.

W przypadku zakładów sportowych, Corgi Bet wyróżnia się szeroką gamą dyscyplin, od piłki nożnej po e-sport. Gracze mogą wybierać spośród różnych typów zakładów, co daje im większą elastyczność i możliwość dostosowania strategii. Warto również wspomnieć o możliwości obstawiania na żywo, co dodaje emocji i dynamiki do rozgrywki.

Dyscyplina Typy zakładów
Piłka nożna 1X2, Over/Under, Handicap
Koszykówka Spread, Total Points
E-sport Map Winner, Total Rounds

Doświadczenia graczy: Czy Corgi Bet jest godny zaufania?

Wielu graczy zwraca uwagę na bezpieczeństwo i uczciwość platformy. Corgi Bet zdobył pozytywne opinie w tej kwestii, ponieważ korzysta z najnowszych technologii szyfrujących, co zapewnia ochronę danych użytkowników. Możliwość korzystania z różnych metod płatności, w tym portfeli elektronicznych, również buduje zaufanie wśród graczy.

Jednak jak w każdej branży, zdarzają się również negatywne doświadczenia. Niektórzy gracze narzekają na długi czas oczekiwania na wypłaty, co może budzić frustrację. Corgi Bet stara się jednak reagować na opinie społeczności i wprowadzać poprawki, aby zwiększyć wydajność swoich usług. Gracze podkreślają, że dobry kontakt z obsługą klienta jest kluczowy i w tym przypadku Corgi Bet zdobywa punkty.

Porady dla nowych graczy na Corgi Bet

  1. Przeczytaj regulamin i zasady korzystania z platformy, aby uniknąć nieprzyjemnych niespodzianek.
  2. Skorzystaj z bonusów powitalnych, aby zwiększyć swoje szanse na wygraną.
  3. Rozważ ustawienie limitów dla swoich zakładów, aby gra była bezpieczna i przyjemna.
  4. Regularnie sprawdzaj aktualizacje dotyczące gier i promocji, aby nie przegapić żadnej okazji.

Podsumowanie: Corgi Bet w oczach społeczności graczy

Podsumowując, Corgi Bet zyskał uznanie wśród graczy dzięki szerokiej ofercie gier, atrakcyjnym bonusom oraz przejrzystym zasadom działania. Choć nie jest wolny od pewnych problemów, większość graczy docenia jego starania w zakresie poprawy jakości usług. Warto samodzielnie przetestować platformę i doświadczyć jej unikalnego klimatu. Jeśli szukasz miejsca, gdzie można wygodnie obstawiać i grać w kasynie, Corgi Bet może być idealnym wyborem dla Ciebie.

Fast Export of Large MySQL Data to Excel using Laravel and Python

28th August 2025 Uncategorised No comments

Introduction:
Handling large datasets can be a challenge. When tasked with exporting thousands of rows from a MySQL database using Laravel, I found traditional methods lacking. This article showcases a solution that marries Laravel, Python, and Pandas for efficient data export.

Why Python with Pandas?
Python’s Pandas module is a powerhouse for data manipulation. Its prowess in swiftly exporting large datasets to Excel makes it an attractive choice for this challenge.

Integrating Symfony/Process in Laravel:
The symfony/process extension in PHP is our bridge to the Python world. It facilitates the execution of shell commands, in this case, running our Python script.

Laravel Export Function:
This function is the core of our solution. Here’s a breakdown:

$result = DB::table('full_report');
// ... [Database querying based on request parameters]
$sql = $result->toSql();
$bindings = $result->getBindings();
$filledSql = vsprintf(str_replace('?', "'%s'", $sql), $bindings);
$filename = 'FullReport-' . Carbon::now()->timestamp . '.xlsx';
$process = new Process(['/opt/homebrew/bin/python3', 'export.py', $filledSql, $filename]);
$process->run();
if (!$process->isSuccessful()) {
    throw new ProcessFailedException($process);
}
return response()->json(['success' => 'Export started successfully!']);

Abstract:
The function begins by querying the database based on request parameters. It then generates the SQL query and its bindings. Finally, using the Symfony Process, it runs the Python script, passing the SQL query and filename as arguments.

AJAX Request:
The AJAX request serves as the trigger for our export function.

$.ajax({
    // ... [AJAX setup and data parameters]
    success: function(response) {
        if (response.success) {
            console.log("Success:", response.success);
        }
    },
    error: function(error) {
        console.error("Error:", error);
    }
});

Abstract:
This asynchronous request sends data parameters to the server. Upon successful data export, it provides feedback to the user. In case of errors, they are logged for debugging.

Python Script (export.py):
This script is responsible for fetching and exporting the data.

import pandas as pd
import mysql.connector
import sys
import os
# ... [Database connection setup]
query = sys.argv[1]
filename = sys.argv[2]
df = pd.read_sql(query, cnx);
storage_path = os.path.join(os.path.dirname(__file__), '..', 'storage', 'app', 'public');
os.makedirs(storage_path, exist_ok=True);
df.to_excel(os.path.join(storage_path, filename), index=False);
cnx.close();

Abstract:
The script connects to the MySQL database using mysql.connector. It then fetches the data using Pandas based on the SQL query passed from Laravel. The data is saved as an Excel file in Laravel’s storage directory.

Conclusion:
By combining Laravel, Python, and Pandas, we achieve:

  • Speed: Rapid export of large datasets.
  • Flexibility: Harnessing the strengths of both PHP and Python.
  • Background Processing: Ensuring system responsiveness.

In web development, such integrative solutions can lead to enhanced efficiency and user satisfaction.

Teaser Slider

28th August 2025 JavaScript and jQuery 6 comments

I have been looking for a while for a teaser slide the could do the following:

  1. Simple slider functionality.
  2. An option to tease for the next slide by small image within each slide.

All I found are normal slides that display a part of next slide. But what if I need to just promote with a small image, that not a must to be a part of next slide, while it’s like an Ad for it only.

That’s why I made this slider from scratch.

Here’s the Git Repository:

Teaser Slider Repository

Here’s the one page code, and your images should be inside ‘slides’ folder or whatever you want 😉

<!DOCTYPE html>
<html>
<head>
    <title>CairoCode Slider</title>
    <style>
        /*-CairoCoder Slide-*/
        .cc-wrapper {
            width: 960px;
            max-height: 495px;
            overflow: hidden;
            position: relative;
        }
        .cc-slide {
            display: none;
        }
        .cc-slide.cc-active {
            display: block;
        }
        .slide {
            width: 100%;
            float: left;
            height: auto;
        }
        .teaser {
            float: left;
            max-height: 100%;
            position: absolute;
            top: 0;
            right: -15%;
            opacity: 0.8;
            cursor: pointer;
            border-radius: 5px 0 0 5px;
            transition-timing-function: ease-in;
            transition: 0.25s;
        }
        .teaser:hover {
            right: 0;
            opacity: 1;
            transition-timing-function: ease-out;
            transition: 0.25s;
        }
    </style>
</head>
<body>
<div class="cc-slider">
    <ul class="cc-wrapper">
        <li class="cc-slide cc-active">
            <img class="slide" src="slides/slide1.png" alt="slide1">
            <img class="teaser" src="slides/teaser1.png" alt="teaser1">
        </li>
        <li class="cc-slide">
            <img class="slide" src="slides/slide2.png" alt="slide2">
            <img class="teaser" src="slides/teaser2.png" alt="teaser2">
        </li>
    </ul>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"
        integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
        crossorigin="anonymous"></script>
<script>
    $('.teaser').click(function () {
        var next = $(this).parent().next('.cc-slide');
        $(this).parent().hide();
        if (next.length > 0) {
            next.show();
        } else {
            $('.cc-slide').hide().first().show();
        }
    });
</script>
</body>
</html>

How to shorten (terminal) command line (bash) prompt (hide computer name and user name) for Mac users and Linux

28th August 2025 Uncategorised No comments

Mac’s display name and username occupy space on the command line. some users who are working regularly on terminal may be disturbed by how long the computer name and username appears on the terminal line, here’s how to hide them.

Open Terminal, then go to Terminal menu > Preferences > Shell then select “Run command:” and write the following command:

PS1=”\w\$”;clear;

And here we go, no more computer name and username 🙂

 

Buttons should not have a “hand cursor” !

28th August 2025 UI No comments

han cursor

The hand cursor is for links

The hand (and often underlined text) signifies a link. Links are not buttons. Links came along with the web. To help users understand that they are different, they are given the hand cursor. It serves as an extra clue. Here’s why:

  1. Clicking a link opens a web page or resource.
  2. (On desktop) I can right-click on a link and do many things (that I can’t do with a button). Open in new tab/window, save a link, copy address, add to reading list, bookmark it and more.
  3. (On mobile devices) I can tap and hold on a link and get a similar context menu as per the previous point.
  4. A link also tells me that I am just going somewhere else. I am not modifying any data or making changes in anyway (like a button is likely to do).

When a button has the hand cursor, it subtly suggests that the user is interacting with a link when they’re not. If you want to give visual feedback when the user hovers, you can do so with other style changes such as background colour. A well-designed button does not need a hand cursor to help the user realise it does something.

The hand cursor is reserved for links. This is because they are unique in their behaviour. Browsers and Operating Systems have done the work for you — because contrary to popular belief — browsers know best.

Links have always been handled this way since the web came along — this is the convention of the web that you need not innovate on. You can rest easy knowing that browsers have you covered. This leaves you and your team to solve real problems.

Microsoft’s design guides talk about weak affordance:

Text and graphics links use a hand […] pointer […] because of their weak affordance. While links may have other visual clues to indicate that they are links (such as underlines and special placement), displaying the hand pointer on hover is the definitive indication of a link.

To avoid confusion, it is imperative not to use the hand pointer for other purposes. For example, command buttons already have a strong affordance, so they don’t need a hand pointer. The hand pointer must mean “this target is a link” and nothing else.

Apple’s Human Interface Guidelines states that the hand cursor should be used when “the content is a URL link”. W3C User Interface guidelines says the same thing again with “The cursor is a pointer that indicates a link”.

Reference:
Buttons shouldn’t have a hand cursor

Get data from specific table within past x of months

28th August 2025 MySQL No comments

Here’s how to get data from specific table within past 20 months of current data.

The problem is that you need to get exactly the start of first month in the same period in the criteria you specified. in below MySQL query, you can achieve that easily.

SELECT * FROM `table`
WHERE `date` BETWEEN DATE_SUB(DATE_SUB(CURDATE(), INTERVAL 20 MONTH), INTERVAL DAY(DATE_SUB(CURDATE(), INTERVAL 20 MONTH)) -1 DAY) AND CURDATE()

Prevent CSS and JavaScript files caching !

28th August 2025 JavaScript and jQuery No comments

Simple Client-side Technique

In general, caching is good.. So there are a couple of techniques, depending on whether you’re fixing the problem for yourself as you develop a website, or whether you’re trying to control cache in a production environment.

General visitors to your website won’t have the same experience that you’re having when you’re developing the site. Since the average visitor comes to the site less frequently (maybe only a few times each month, unless you’re a Google or hi5 Networks), then they are less likely to have your files in cache, and that may be enough. If you want to force a new version into the browser, you can always add a query string to the request, and bump up the version number when you make major changes:

<script src="/myJavascript.js?version=4"></script>

This will ensure that everyone gets the new file. It works because the browser looks at the URL of the file to determine whether it has a copy in cache. If your server isn’t set up to do anything with the query string, it will be ignored, but the name will look like a new file to the browser.

On the other hand, if you’re developing a website, you don’t want to change the version number every time you save a change to your development version. That would be tedious.

So while you’re developing your site, a good trick would be to automatically generate a query string parameter:

<!-- Development version: -->
<script>document.write('<script src="/myJavascript.js?dev=' + Math.floor(Math.random() * 100) + '"\><\/script>');</script>

Adding a query string to the request is a good way to version a resource, but for a simple website this may be unnecessary. And remember, caching is a good thing.

It’s also worth noting that the browser isn’t necessarily stingy about keeping files in cache. Browsers have policies for this sort of thing, and they are usually playing by the rules laid down in the HTTP specification. When a browser makes a request to a server, part of the response is an EXPIRES header.. a date which tells the browser how long it should be kept in cache. The next time the browser comes across a request for the same file, it sees that it has a copy in cache and looks to the EXPIRES date to decide whether it should be used.

So believe it or not, it’s actually your server that is making that browser cache so persistent. You could adjust your server settings and change the EXPIRES headers, but the little technique I’ve written above is probably a much simpler way for you to go about it. Since caching is good, you usually want to set that date far into the future (a “Far-future Expires Header”), and use the technique described above to force a change.

If you’re interested in more info on HTTP or how these requests are made, a good book is “High Performance Web Sites” by Steve Souders. It’s a very good introduction to the subject.

Another useful article:

Can We Prevent CSS Caching?

Get the “text” of the selected “option” using PHP and JavaScript

28th August 2025 JavaScript and jQuery, PHP No comments

This is not something that can be done through PHP alone. The PHP script can only “see” the information which is posted (the value for the selected option that is posted). You can use javascript to alter a hidden input field with the text contents of a selected option, and this will be included in the $_POST array:

<form  action="test.php"  method="POST">  
    <select id="test" onchange="document.getElementById('text_content').value=this.options[this.selectedIndex].text">
     <option value="1">Test One</option>
     <option value="2">Test Two</option>
    </select>

<input type="hidden" name="test_text" id="text_content" value="" />
</form>

 

This will make the $_POST['test_text'] available with the selected index (but you should also force the onchange() function when the page loads so that it will be populated even if the user leaves the select field at the default value.

Redux | The Missing Guide

28th August 2025 Uncategorised No comments