Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've noticed that the browscap table has grown rather large, up to 32 MB at this point. Is this correct behavior? Will it continue to grow? Can it be emptied or reset?
Comments
Comment #1
AohRveTPV CreditAttribution: AohRveTPV commentedSeems correct. The source
browscap.ini
file at http://browscap.org for the browser information is currently ~6.5MB. Serializing that data and storing it in the database adds overhead. My MySQL table on a site where I just installed Browscap looks to be about 40MB.Probably, yes. New browser information should be added to the
browscap.ini
at http://browscap.org as new browsers are released.The growth is not due to stale data accumulating in the Drupal database. Every time a new
browscap.ini
is imported the old information is overwritten.You can empty it but it will just become the same size the next time the data is downloaded.
If you really want to reduce its size, you could try changing
import.inc
to use the "lite"browscap.ini
file instead of the default, which should reduce the size by about 1/3. I haven't tested it but it is probably just a matter of changing the URL http://browscap.org/stream?q=PHP_BrowsCapINI to http://browscap.org/stream?q=Lite_PHP_BrowsCapINI.Note that the
browscap.ini
downloads have been broken for a few months due to #2171549: Can't dowload last Browscap.ini RC from http://browscap.org/.Comment #2
gregglesI think comment #1 answers the questions here rather well. Thanks!