We're on Discord! Please join our server now if you don't want to miss anything! (More info) | Join the UCC4 contest! (More info)

* WalrusIRC & Discord main room

If you have a forum account, have more than 4 posts and are not part of a restricted usergroup, then you can chat in our main Discord server room directly from here and continue using the forums at the same time. Or you can join our server directly and access many more discussion rooms!

Author Topic: Dynamically generated GIF scrolltext  (Read 5891 times)

0 Members and 1 Guest are viewing this topic.

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Moderator
  • Forum Maintenance
  • Original 5
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 19083
  • Post Rating Ratio: +101/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #15 on: December 24, 2015, 07:39:43 am »
I assume it's because it's dynamically-generated? One other issue could be the file size, though, but in Darkest's case his avatar is under 300 KB.

Btw, try to not make your text too long if you ever use such avatar. Even 300 KB is a bit large for an avatar, especially on 3G, but it's tolerable. But smaller is better whenever possible. I wonder if adding the Walrii would make it larger?
  • Calculators owned: TI-84 Plus C Silver Edition, TI-84 Plus CE, Casio fx-CG10
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nintendo Switch, Playstation TV

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline c4ooo

  • Pedanticity prevents ambiguity
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 1036
  • Post Rating Ratio: +13/-4
  • Advanced forumer
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #16 on: December 25, 2015, 01:07:09 am »
I assume it's because it's dynamically-generated? One other issue could be the file size, though, but in Darkest's case his avatar is under 300 KB.
Yes but how does it know that? I would presume the browser just caches every thing except php files.
@DarkestEx

Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1346
  • Post Rating Ratio: +11/-2
    • @0xbmuessig
    • @muessigb
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #17 on: December 25, 2015, 01:19:43 am »
I assume it's because it's dynamically-generated? One other issue could be the file size, though, but in Darkest's case his avatar is under 300 KB.
Yes but how does it know that? I would presume the browser just caches every thing except php files.
@DarkestEx
Well the PHP page generates the image every few hours or when its force refreshed.
The browser has no idea that the image is actually auto generated as the PHP makes it look just like a normal image. PHP files are (as long as the server works correctly) never sent to the actual visitor of the website or their browser. They get executed on the webserver.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360

Offline c4ooo

  • Pedanticity prevents ambiguity
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 1036
  • Post Rating Ratio: +13/-4
  • Advanced forumer
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #18 on: January 01, 2016, 06:40:34 am »
sorry if i seem bothersome, but I still dont understand. Why wont the browser just chache the first image that was generated just like it would a static file? Or is the extension of that image literally .php?

Also, i was hoping your profile picture would go into negative numbers, but unfortunately it doesn't XD

Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1346
  • Post Rating Ratio: +11/-2
    • @0xbmuessig
    • @muessigb
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #19 on: January 01, 2016, 12:32:00 pm »
sorry if i seem bothersome, but I still dont understand. Why wont the browser just chache the first image that was generated just like it would a static file? Or is the extension of that image literally .php?

Also, i was hoping your profile picture would go into negative numbers, but unfortunately it doesn't XD
Well browsers do cache images on their own, but as many people visit this page, every time my avatar is downloaded by the browser from the internet, it produces a big page load on my side. Every time the image is loaded from the web, the php script I wrote is called. It checks if there is new content or if the image is for any reason outdated. If not, the last generated image is sent. If the image needs to be refreshed, the last image is deleted and a new one is generated and saves to disk.

Haha, I used abs in the first place but after new year I changed it to new, static slogan.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Moderator
  • Forum Maintenance
  • Original 5
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 19083
  • Post Rating Ratio: +101/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #20 on: January 01, 2016, 10:10:44 pm »
I always wondered how to make a php script or image on a web server force refresh every few minute or so or when it changed, because when I change the site logo or edit the theme, it can take months before users see the changes.
  • Calculators owned: TI-84 Plus C Silver Edition, TI-84 Plus CE, Casio fx-CG10
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nintendo Switch, Playstation TV

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1346
  • Post Rating Ratio: +11/-2
    • @0xbmuessig
    • @muessigb
  • Gender: Male
Re: Dynamically generated GIF scrolltext
« Reply #21 on: January 02, 2016, 01:26:52 am »
I always wondered how to make a php script or image on a web server force refresh every few minute or so or when it changed, because when I change the site logo or edit the theme, it can take months before users see the changes.
Doing that is very simple. For CSS, there are a few easy solutions too.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games